You've already forked linux-packaging-mono
Imported Upstream version 4.6.0.125
Former-commit-id: a2155e9bd80020e49e72e86c44da02a8ac0e57a4
This commit is contained in:
parent
a569aebcfd
commit
e79aa3c0ed
@@ -0,0 +1,31 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <copyright file="ADVF.cs" company="Microsoft">
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// </copyright>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace System.Runtime.InteropServices.ComTypes {
|
||||
|
||||
using System;
|
||||
|
||||
/// <devdoc>
|
||||
/// </devdoc>
|
||||
[Flags]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1712:DoNotPrefixEnumValuesWithTypeName")]
|
||||
public enum ADVF {
|
||||
ADVF_NODATA = 1,
|
||||
ADVF_PRIMEFIRST = 2,
|
||||
ADVF_ONLYONCE = 4,
|
||||
ADVF_DATAONSTOP = 64,
|
||||
ADVFCACHE_NOHANDLER = 8,
|
||||
ADVFCACHE_FORCEBUILTIN = 16,
|
||||
ADVFCACHE_ONSAVE = 32
|
||||
}
|
||||
|
||||
// Note: ADVF_ONLYONCE and ADVF_PRIMEFIRST values conform with objidl.dll but are backwards from
|
||||
// the Platform SDK documentation as of 07/21/2003.
|
||||
// http://msdn.microsoft.com/library/default.asp?url=/library/en-us/com/htm/oen_a2z_8jxi.asp.
|
||||
// See VSWhidbey bug#96162.
|
||||
}
|
||||
|
||||
|
@@ -0,0 +1,19 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <copyright file="DATADIR.cs" company="Microsoft">
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// </copyright>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace System.Runtime.InteropServices.ComTypes {
|
||||
|
||||
using System;
|
||||
|
||||
/// <devdoc>
|
||||
/// </devdoc>
|
||||
public enum DATADIR {
|
||||
DATADIR_GET = 1,
|
||||
DATADIR_SET = 2
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -0,0 +1,22 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <copyright file="DVASPECT.cs" company="Microsoft">
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// </copyright>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace System.Runtime.InteropServices.ComTypes {
|
||||
|
||||
using System;
|
||||
|
||||
/// <devdoc>
|
||||
/// </devdoc>
|
||||
[Flags]
|
||||
public enum DVASPECT {
|
||||
DVASPECT_CONTENT = 1,
|
||||
DVASPECT_THUMBNAIL = 2,
|
||||
DVASPECT_ICON = 4,
|
||||
DVASPECT_DOCPRINT = 8
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -0,0 +1,26 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <copyright file="FORMATETC.cs" company="Microsoft">
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// </copyright>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace System.Runtime.InteropServices.ComTypes {
|
||||
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
/// <devdoc>
|
||||
/// </devdoc>
|
||||
public struct FORMATETC {
|
||||
[MarshalAs(UnmanagedType.U2)]
|
||||
public short cfFormat;
|
||||
public IntPtr ptd;
|
||||
[MarshalAs(UnmanagedType.U4)]
|
||||
public DVASPECT dwAspect;
|
||||
public int lindex;
|
||||
[MarshalAs(UnmanagedType.U4)]
|
||||
public TYMED tymed;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -0,0 +1,224 @@
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
|
||||
[assembly: SuppressMessage("Microsoft.MSInternal", "CA905:SystemAndMicrosoftNamespacesRequireApproval", Scope="namespace", Target="System.Runtime.InteropServices.ComTypes")]
|
||||
|
||||
[assembly: SuppressMessage("Microsoft.Design", "CA1051:DoNotDeclareVisibleInstanceFields", Scope="member", Target="System.Runtime.InteropServices.ComTypes.FORMATETC.cfFormat")]
|
||||
[assembly: SuppressMessage("Microsoft.Design", "CA1051:DoNotDeclareVisibleInstanceFields", Scope="member", Target="System.Runtime.InteropServices.ComTypes.FORMATETC.lindex")]
|
||||
[assembly: SuppressMessage("Microsoft.Design", "CA1051:DoNotDeclareVisibleInstanceFields", Scope="member", Target="System.Runtime.InteropServices.ComTypes.FORMATETC.ptd")]
|
||||
[assembly: SuppressMessage("Microsoft.Design", "CA1051:DoNotDeclareVisibleInstanceFields", Scope="member", Target="System.Runtime.InteropServices.ComTypes.FORMATETC.tymed")]
|
||||
[assembly: SuppressMessage("Microsoft.Design", "CA1051:DoNotDeclareVisibleInstanceFields", Scope="member", Target="System.Runtime.InteropServices.ComTypes.FORMATETC.dwAspect")]
|
||||
[assembly: SuppressMessage("Microsoft.Design", "CA1051:DoNotDeclareVisibleInstanceFields", Scope="member", Target="System.Runtime.InteropServices.ComTypes.STGMEDIUM.pUnkForRelease")]
|
||||
[assembly: SuppressMessage("Microsoft.Design", "CA1051:DoNotDeclareVisibleInstanceFields", Scope="member", Target="System.Runtime.InteropServices.ComTypes.STGMEDIUM.unionmember")]
|
||||
[assembly: SuppressMessage("Microsoft.Design", "CA1051:DoNotDeclareVisibleInstanceFields", Scope="member", Target="System.Runtime.InteropServices.ComTypes.STGMEDIUM.tymed")]
|
||||
[assembly: SuppressMessage("Microsoft.Design", "CA1051:DoNotDeclareVisibleInstanceFields", Scope="member", Target="System.Runtime.InteropServices.ComTypes.STATDATA.formatetc")]
|
||||
[assembly: SuppressMessage("Microsoft.Design", "CA1051:DoNotDeclareVisibleInstanceFields", Scope="member", Target="System.Runtime.InteropServices.ComTypes.STATDATA.advSink")]
|
||||
[assembly: SuppressMessage("Microsoft.Design", "CA1051:DoNotDeclareVisibleInstanceFields", Scope="member", Target="System.Runtime.InteropServices.ComTypes.STATDATA.advf")]
|
||||
[assembly: SuppressMessage("Microsoft.Design", "CA1051:DoNotDeclareVisibleInstanceFields", Scope="member", Target="System.Runtime.InteropServices.ComTypes.STATDATA.connection")]
|
||||
|
||||
[assembly: SuppressMessage("Microsoft.Naming", "CA1714:FlagsEnumsShouldHavePluralNames", Scope="type", Target="System.Runtime.InteropServices.ComTypes.DVASPECT")]
|
||||
[assembly: SuppressMessage("Microsoft.Naming", "CA1714:FlagsEnumsShouldHavePluralNames", Scope="type", Target="System.Runtime.InteropServices.ComTypes.ADVF")]
|
||||
[assembly: SuppressMessage("Microsoft.Naming", "CA1714:FlagsEnumsShouldHavePluralNames", Scope="type", Target="System.Runtime.InteropServices.ComTypes.TYMED")]
|
||||
[assembly: SuppressMessage("Microsoft.Design", "CA1008:EnumsShouldHaveZeroValue", Scope="type", Target="System.Runtime.InteropServices.ComTypes.TYMED")]
|
||||
|
||||
[assembly: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope="member", Target="System.Runtime.InteropServices.ComTypes.IEnumSTATDATA.Next(System.Int32,System.Runtime.InteropServices.ComTypes.STATDATA[],System.Int32[]):System.Int32")]
|
||||
[assembly: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope="member", Target="System.Runtime.InteropServices.ComTypes.IEnumSTATDATA.Next(System.Int32,System.Runtime.InteropServices.ComTypes.STATDATA[],System.Int32[]):System.Int32")]
|
||||
[assembly: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope="member", Target="System.Runtime.InteropServices.ComTypes.IDataObject.DAdvise(System.Runtime.InteropServices.ComTypes.FORMATETC&,System.Runtime.InteropServices.ComTypes.ADVF,System.Runtime.InteropServices.ComTypes.IAdviseSink,System.Int32&):System.Int32")]
|
||||
[assembly: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope="member", Target="System.Runtime.InteropServices.ComTypes.IDataObject.DAdvise(System.Runtime.InteropServices.ComTypes.FORMATETC&,System.Runtime.InteropServices.ComTypes.ADVF,System.Runtime.InteropServices.ComTypes.IAdviseSink,System.Int32&):System.Int32")]
|
||||
[assembly: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope="member", Target="System.Runtime.InteropServices.ComTypes.IDataObject.DAdvise(System.Runtime.InteropServices.ComTypes.FORMATETC&,System.Runtime.InteropServices.ComTypes.ADVF,System.Runtime.InteropServices.ComTypes.IAdviseSink,System.Int32&):System.Int32")]
|
||||
[assembly: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope="member", Target="System.Runtime.InteropServices.ComTypes.IDataObject.DUnadvise(System.Int32):System.Void")]
|
||||
[assembly: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope="member", Target="System.Runtime.InteropServices.ComTypes.IEnumFORMATETC.Next(System.Int32,System.Runtime.InteropServices.ComTypes.FORMATETC[],System.Int32[]):System.Int32")]
|
||||
[assembly: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope="member", Target="System.Runtime.InteropServices.ComTypes.IEnumFORMATETC.Next(System.Int32,System.Runtime.InteropServices.ComTypes.FORMATETC[],System.Int32[]):System.Int32")]
|
||||
[assembly: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope="member", Target="System.Runtime.InteropServices.ComTypes.FORMATETC.lindex")]
|
||||
[assembly: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope="member", Target="System.Runtime.InteropServices.ComTypes.FORMATETC.ptd")]
|
||||
[assembly: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope="member", Target="System.Runtime.InteropServices.ComTypes.FORMATETC.tymed")]
|
||||
[assembly: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope="member", Target="System.Runtime.InteropServices.ComTypes.FORMATETC.dwAspect")]
|
||||
[assembly: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope="member", Target="System.Runtime.InteropServices.ComTypes.STGMEDIUM.pUnkForRelease")]
|
||||
[assembly: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope="member", Target="System.Runtime.InteropServices.ComTypes.STGMEDIUM.unionmember")]
|
||||
[assembly: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope="member", Target="System.Runtime.InteropServices.ComTypes.STGMEDIUM.tymed")]
|
||||
[assembly: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope="member", Target="System.Runtime.InteropServices.ComTypes.IAdviseSink.OnDataChange(System.Runtime.InteropServices.ComTypes.FORMATETC&,System.Runtime.InteropServices.ComTypes.STGMEDIUM&):System.Void")]
|
||||
[assembly: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope="member", Target="System.Runtime.InteropServices.ComTypes.STATDATA.formatetc")]
|
||||
[assembly: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope="member", Target="System.Runtime.InteropServices.ComTypes.STATDATA.advf")]
|
||||
|
||||
[assembly: SuppressMessage("Microsoft.Naming", "CA1707:IdentifiersShouldNotContainUnderscores", Scope="member", Target="System.Runtime.InteropServices.ComTypes.DVASPECT.DVASPECT_THUMBNAIL")]
|
||||
[assembly: SuppressMessage("Microsoft.Naming", "CA1707:IdentifiersShouldNotContainUnderscores", Scope="member", Target="System.Runtime.InteropServices.ComTypes.DVASPECT.DVASPECT_DOCPRINT")]
|
||||
[assembly: SuppressMessage("Microsoft.Naming", "CA1707:IdentifiersShouldNotContainUnderscores", Scope="member", Target="System.Runtime.InteropServices.ComTypes.DVASPECT.DVASPECT_CONTENT")]
|
||||
[assembly: SuppressMessage("Microsoft.Naming", "CA1707:IdentifiersShouldNotContainUnderscores", Scope="member", Target="System.Runtime.InteropServices.ComTypes.DVASPECT.DVASPECT_ICON")]
|
||||
[assembly: SuppressMessage("Microsoft.Naming", "CA1707:IdentifiersShouldNotContainUnderscores", Scope="member", Target="System.Runtime.InteropServices.ComTypes.ADVF.ADVF_DATAONSTOP")]
|
||||
[assembly: SuppressMessage("Microsoft.Naming", "CA1707:IdentifiersShouldNotContainUnderscores", Scope="member", Target="System.Runtime.InteropServices.ComTypes.ADVF.ADVF_NODATA")]
|
||||
[assembly: SuppressMessage("Microsoft.Naming", "CA1707:IdentifiersShouldNotContainUnderscores", Scope="member", Target="System.Runtime.InteropServices.ComTypes.ADVF.ADVFCACHE_FORCEBUILTIN")]
|
||||
[assembly: SuppressMessage("Microsoft.Naming", "CA1707:IdentifiersShouldNotContainUnderscores", Scope="member", Target="System.Runtime.InteropServices.ComTypes.ADVF.ADVF_PRIMEFIRST")]
|
||||
[assembly: SuppressMessage("Microsoft.Naming", "CA1707:IdentifiersShouldNotContainUnderscores", Scope="member", Target="System.Runtime.InteropServices.ComTypes.ADVF.ADVF_ONLYONCE")]
|
||||
[assembly: SuppressMessage("Microsoft.Naming", "CA1707:IdentifiersShouldNotContainUnderscores", Scope="member", Target="System.Runtime.InteropServices.ComTypes.ADVF.ADVFCACHE_NOHANDLER")]
|
||||
[assembly: SuppressMessage("Microsoft.Naming", "CA1707:IdentifiersShouldNotContainUnderscores", Scope="member", Target="System.Runtime.InteropServices.ComTypes.ADVF.ADVFCACHE_ONSAVE")]
|
||||
[assembly: SuppressMessage("Microsoft.Naming", "CA1707:IdentifiersShouldNotContainUnderscores", Scope="member", Target="System.Runtime.InteropServices.ComTypes.DATADIR.DATADIR_GET")]
|
||||
[assembly: SuppressMessage("Microsoft.Naming", "CA1707:IdentifiersShouldNotContainUnderscores", Scope="member", Target="System.Runtime.InteropServices.ComTypes.DATADIR.DATADIR_SET")]
|
||||
[assembly: SuppressMessage("Microsoft.Naming", "CA1707:IdentifiersShouldNotContainUnderscores", Scope="member", Target="System.Runtime.InteropServices.ComTypes.TYMED.TYMED_ISTORAGE")]
|
||||
[assembly: SuppressMessage("Microsoft.Naming", "CA1707:IdentifiersShouldNotContainUnderscores", Scope="member", Target="System.Runtime.InteropServices.ComTypes.TYMED.TYMED_FILE")]
|
||||
[assembly: SuppressMessage("Microsoft.Naming", "CA1707:IdentifiersShouldNotContainUnderscores", Scope="member", Target="System.Runtime.InteropServices.ComTypes.TYMED.TYMED_HGLOBAL")]
|
||||
[assembly: SuppressMessage("Microsoft.Naming", "CA1707:IdentifiersShouldNotContainUnderscores", Scope="member", Target="System.Runtime.InteropServices.ComTypes.TYMED.TYMED_ENHMF")]
|
||||
[assembly: SuppressMessage("Microsoft.Naming", "CA1707:IdentifiersShouldNotContainUnderscores", Scope="member", Target="System.Runtime.InteropServices.ComTypes.TYMED.TYMED_MFPICT")]
|
||||
[assembly: SuppressMessage("Microsoft.Naming", "CA1707:IdentifiersShouldNotContainUnderscores", Scope="member", Target="System.Runtime.InteropServices.ComTypes.TYMED.TYMED_GDI")]
|
||||
[assembly: SuppressMessage("Microsoft.Naming", "CA1707:IdentifiersShouldNotContainUnderscores", Scope="member", Target="System.Runtime.InteropServices.ComTypes.TYMED.TYMED_ISTREAM")]
|
||||
[assembly: SuppressMessage("Microsoft.Naming", "CA1707:IdentifiersShouldNotContainUnderscores", Scope="member", Target="System.Runtime.InteropServices.ComTypes.TYMED.TYMED_NULL")]
|
||||
|
||||
// Cannot change names - breaking change.
|
||||
[assembly: SuppressMessage("Microsoft.Naming", "CA1705:LongAcronymsShouldBePascalCased", Scope="type", Target="System.Runtime.InteropServices.ComTypes.DVASPECT")]
|
||||
[assembly: SuppressMessage("Microsoft.Naming", "CA1705:LongAcronymsShouldBePascalCased", Scope="member", Target="System.Runtime.InteropServices.ComTypes.DVASPECT.DVASPECT_THUMBNAIL")]
|
||||
[assembly: SuppressMessage("Microsoft.Naming", "CA1705:LongAcronymsShouldBePascalCased", Scope="member", Target="System.Runtime.InteropServices.ComTypes.DVASPECT.DVASPECT_DOCPRINT")]
|
||||
[assembly: SuppressMessage("Microsoft.Naming", "CA1705:LongAcronymsShouldBePascalCased", Scope="member", Target="System.Runtime.InteropServices.ComTypes.DVASPECT.DVASPECT_CONTENT")]
|
||||
[assembly: SuppressMessage("Microsoft.Naming", "CA1705:LongAcronymsShouldBePascalCased", Scope="member", Target="System.Runtime.InteropServices.ComTypes.DVASPECT.DVASPECT_ICON")]
|
||||
[assembly: SuppressMessage("Microsoft.Naming", "CA1705:LongAcronymsShouldBePascalCased", Scope="type", Target="System.Runtime.InteropServices.ComTypes.IEnumSTATDATA")]
|
||||
[assembly: SuppressMessage("Microsoft.Naming", "CA1705:LongAcronymsShouldBePascalCased", Scope="type", Target="System.Runtime.InteropServices.ComTypes.IEnumFORMATETC")]
|
||||
[assembly: SuppressMessage("Microsoft.Naming", "CA1705:LongAcronymsShouldBePascalCased", Scope="type", Target="System.Runtime.InteropServices.ComTypes.ADVF")]
|
||||
[assembly: SuppressMessage("Microsoft.Naming", "CA1705:LongAcronymsShouldBePascalCased", Scope="member", Target="System.Runtime.InteropServices.ComTypes.ADVF.ADVF_DATAONSTOP")]
|
||||
[assembly: SuppressMessage("Microsoft.Naming", "CA1705:LongAcronymsShouldBePascalCased", Scope="member", Target="System.Runtime.InteropServices.ComTypes.ADVF.ADVF_NODATA")]
|
||||
[assembly: SuppressMessage("Microsoft.Naming", "CA1705:LongAcronymsShouldBePascalCased", Scope="member", Target="System.Runtime.InteropServices.ComTypes.ADVF.ADVFCACHE_FORCEBUILTIN")]
|
||||
[assembly: SuppressMessage("Microsoft.Naming", "CA1705:LongAcronymsShouldBePascalCased", Scope="member", Target="System.Runtime.InteropServices.ComTypes.ADVF.ADVF_PRIMEFIRST")]
|
||||
[assembly: SuppressMessage("Microsoft.Naming", "CA1705:LongAcronymsShouldBePascalCased", Scope="member", Target="System.Runtime.InteropServices.ComTypes.ADVF.ADVF_ONLYONCE")]
|
||||
[assembly: SuppressMessage("Microsoft.Naming", "CA1705:LongAcronymsShouldBePascalCased", Scope="member", Target="System.Runtime.InteropServices.ComTypes.ADVF.ADVFCACHE_NOHANDLER")]
|
||||
[assembly: SuppressMessage("Microsoft.Naming", "CA1705:LongAcronymsShouldBePascalCased", Scope="member", Target="System.Runtime.InteropServices.ComTypes.ADVF.ADVFCACHE_ONSAVE")]
|
||||
[assembly: SuppressMessage("Microsoft.Naming", "CA1705:LongAcronymsShouldBePascalCased", Scope="type", Target="System.Runtime.InteropServices.ComTypes.DATADIR")]
|
||||
[assembly: SuppressMessage("Microsoft.Design", "CA1008:EnumsShouldHaveZeroValue", Scope="type", Target="System.Runtime.InteropServices.ComTypes.DATADIR")]
|
||||
[assembly: SuppressMessage("Microsoft.Naming", "CA1705:LongAcronymsShouldBePascalCased", Scope="member", Target="System.Runtime.InteropServices.ComTypes.DATADIR.DATADIR_GET")]
|
||||
[assembly: SuppressMessage("Microsoft.Naming", "CA1705:LongAcronymsShouldBePascalCased", Scope="member", Target="System.Runtime.InteropServices.ComTypes.DATADIR.DATADIR_SET")]
|
||||
[assembly: SuppressMessage("Microsoft.Naming", "CA1705:LongAcronymsShouldBePascalCased", Scope="type", Target="System.Runtime.InteropServices.ComTypes.FORMATETC")]
|
||||
[assembly: SuppressMessage("Microsoft.Naming", "CA1705:LongAcronymsShouldBePascalCased", Scope="type", Target="System.Runtime.InteropServices.ComTypes.STGMEDIUM")]
|
||||
[assembly: SuppressMessage("Microsoft.Naming", "CA1705:LongAcronymsShouldBePascalCased", Scope="type", Target="System.Runtime.InteropServices.ComTypes.TYMED")]
|
||||
[assembly: SuppressMessage("Microsoft.Naming", "CA1705:LongAcronymsShouldBePascalCased", Scope="member", Target="System.Runtime.InteropServices.ComTypes.TYMED.TYMED_ISTORAGE")]
|
||||
[assembly: SuppressMessage("Microsoft.Naming", "CA1705:LongAcronymsShouldBePascalCased", Scope="member", Target="System.Runtime.InteropServices.ComTypes.TYMED.TYMED_FILE")]
|
||||
[assembly: SuppressMessage("Microsoft.Naming", "CA1705:LongAcronymsShouldBePascalCased", Scope="member", Target="System.Runtime.InteropServices.ComTypes.TYMED.TYMED_HGLOBAL")]
|
||||
[assembly: SuppressMessage("Microsoft.Naming", "CA1705:LongAcronymsShouldBePascalCased", Scope="member", Target="System.Runtime.InteropServices.ComTypes.TYMED.TYMED_ENHMF")]
|
||||
[assembly: SuppressMessage("Microsoft.Naming", "CA1705:LongAcronymsShouldBePascalCased", Scope="member", Target="System.Runtime.InteropServices.ComTypes.TYMED.TYMED_MFPICT")]
|
||||
[assembly: SuppressMessage("Microsoft.Naming", "CA1705:LongAcronymsShouldBePascalCased", Scope="member", Target="System.Runtime.InteropServices.ComTypes.TYMED.TYMED_NULL")]
|
||||
[assembly: SuppressMessage("Microsoft.Naming", "CA1705:LongAcronymsShouldBePascalCased", Scope="member", Target="System.Runtime.InteropServices.ComTypes.TYMED.TYMED_GDI")]
|
||||
[assembly: SuppressMessage("Microsoft.Naming", "CA1705:LongAcronymsShouldBePascalCased", Scope="member", Target="System.Runtime.InteropServices.ComTypes.TYMED.TYMED_ISTREAM")]
|
||||
[assembly: SuppressMessage("Microsoft.Naming", "CA1705:LongAcronymsShouldBePascalCased", Scope="type", Target="System.Runtime.InteropServices.ComTypes.STATDATA")]
|
||||
[assembly: SuppressMessage("Microsoft.Naming", "CA1706:ShortAcronymsShouldBeUppercase", Scope="member", Target="System.Runtime.InteropServices.ComTypes.FORMATETC.cfFormat")]
|
||||
[assembly: SuppressMessage("Microsoft.Naming", "CA1706:ShortAcronymsShouldBeUppercase", Scope="member", Target="System.Runtime.InteropServices.ComTypes.FORMATETC.dwAspect")]
|
||||
|
||||
// struct fields are public and can be used individually for comparisons.
|
||||
[assembly: SuppressMessage("Microsoft.Performance", "CA1815:OverrideEqualsAndOperatorEqualsOnValueTypes", Scope="type", Target="System.Runtime.InteropServices.ComTypes.FORMATETC")]
|
||||
[assembly: SuppressMessage("Microsoft.Performance", "CA1815:OverrideEqualsAndOperatorEqualsOnValueTypes", Scope="type", Target="System.Runtime.InteropServices.ComTypes.STGMEDIUM")]
|
||||
[assembly: SuppressMessage("Microsoft.Performance", "CA1815:OverrideEqualsAndOperatorEqualsOnValueTypes", Scope="type", Target="System.Runtime.InteropServices.ComTypes.STATDATA")]
|
||||
|
||||
// all instances are ok.
|
||||
[assembly: SuppressMessage("Microsoft.Usage", "CA2208:InstantiateArgumentExceptionsCorrectly", Scope="member", Target="System.ComponentModel.TypeDescriptor.CreateInstance(System.IServiceProvider,System.Type,System.Type[],System.Object[]):System.Object")]
|
||||
[assembly: SuppressMessage("Microsoft.Usage", "CA2208:InstantiateArgumentExceptionsCorrectly", Scope="member", Target="System.ComponentModel.TypeDescriptor+ComNativeDescriptionProvider.GetTypeDescriptor(System.Type,System.Object):System.ComponentModel.ICustomTypeDescriptor")]
|
||||
[assembly: SuppressMessage("Microsoft.Usage", "CA2208:InstantiateArgumentExceptionsCorrectly", Scope="member", Target="System.ComponentModel.TypeDescriptor+TypeDescriptionNode.GetTypeDescriptor(System.Type,System.Object):System.ComponentModel.ICustomTypeDescriptor")]
|
||||
[assembly: SuppressMessage("Microsoft.Usage", "CA2208:InstantiateArgumentExceptionsCorrectly", Scope="member", Target="System.ComponentModel.TypeDescriptor+TypeDescriptionNode.CreateInstance(System.IServiceProvider,System.Type,System.Type[],System.Object[]):System.Object")]
|
||||
[assembly: SuppressMessage("Microsoft.Usage", "CA2208:InstantiateArgumentExceptionsCorrectly", Scope="member", Target="System.ComponentModel.PropertyDescriptorCollection.System.Collections.IDictionary.Add(System.Object,System.Object):System.Void")]
|
||||
[assembly: SuppressMessage("Microsoft.Usage", "CA2208:InstantiateArgumentExceptionsCorrectly", Scope="member", Target="System.ComponentModel.PropertyDescriptorCollection.System.Collections.IList.set_Item(System.Int32,System.Object):System.Void")]
|
||||
[assembly: SuppressMessage("Microsoft.Usage", "CA2208:InstantiateArgumentExceptionsCorrectly", Scope="member", Target="System.ComponentModel.PropertyDescriptorCollection.System.Collections.IDictionary.set_Item(System.Object,System.Object):System.Void")]
|
||||
|
||||
// CONSIDER: In future releases we may want to provide a strongly typed implementation of IList.
|
||||
[assembly: SuppressMessage("Microsoft.Design", "CA1039:ListsAreStronglyTyped", Scope="type", Target="System.ComponentModel.Design.DesignerOptionService+DesignerOptionCollection")]
|
||||
[assembly: SuppressMessage("Microsoft.Design", "CA1039:ListsAreStronglyTyped", Scope="type", Target="System.ComponentModel.ListSortDescriptionCollection")]
|
||||
|
||||
// Would be a breaking change.
|
||||
[assembly: SuppressMessage("Microsoft.Design", "CA1034:NestedTypesShouldNotBeVisible", Scope="type", Target="System.ComponentModel.Design.DesignerOptionService+DesignerOptionCollection")]
|
||||
[assembly: SuppressMessage("Microsoft.Design", "CA1034:NestedTypesShouldNotBeVisible", Scope="type", Target="System.ComponentModel.TypeConverter+SimplePropertyDescriptor")]
|
||||
[assembly: SuppressMessage("Microsoft.Design", "CA1034:NestedTypesShouldNotBeVisible", Scope="type", Target="System.ComponentModel.TypeConverter+StandardValuesCollection")]
|
||||
[assembly: SuppressMessage("Microsoft.Security", "CA2111:PointersShouldNotBeVisible", Scope="member", Target="System.Runtime.InteropServices.ComTypes.FORMATETC.ptd")]
|
||||
[assembly: SuppressMessage("Microsoft.Security", "CA2111:PointersShouldNotBeVisible", Scope="member", Target="System.Runtime.InteropServices.ComTypes.STGMEDIUM.unionmember")]
|
||||
[assembly: SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays", Scope="member", Target="System.ComponentModel.Design.IRootDesigner.SupportedTechnologies")]
|
||||
[assembly: SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays", Scope="member", Target="System.ComponentModel.Design.ServiceContainer.DefaultServices")]
|
||||
[assembly: SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays", Scope="member", Target="System.ComponentModel.MemberDescriptor.AttributeArray")]
|
||||
[assembly: SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays", Scope="member", Target="System.ComponentModel.PropertyTabAttribute.TabScopes")]
|
||||
[assembly: SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays", Scope="member", Target="System.ComponentModel.PropertyTabAttribute.TabClasses")]
|
||||
[assembly: SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays", Scope="member", Target="System.ComponentModel.PropertyTabAttribute.TabClassNames")]
|
||||
[assembly: SuppressMessage("Microsoft.Naming", "CA1706:ShortAcronymsShouldBeUppercase", Scope="member", Target="System.ComponentModel.Design.IMenuCommandService.FindCommand(System.ComponentModel.Design.CommandID):System.ComponentModel.Design.MenuCommand")]
|
||||
[assembly: SuppressMessage("Microsoft.Naming", "CA1706:ShortAcronymsShouldBeUppercase", Scope="member", Target="System.ComponentModel.Design.IMenuCommandService.GlobalInvoke(System.ComponentModel.Design.CommandID):System.Boolean")]
|
||||
[assembly: SuppressMessage("Microsoft.Naming", "CA1706:ShortAcronymsShouldBeUppercase", Scope="member", Target="System.ComponentModel.Design.IMenuCommandService.ShowContextMenu(System.ComponentModel.Design.CommandID,System.Int32,System.Int32):System.Void")]
|
||||
[assembly: SuppressMessage("Microsoft.Naming", "CA1706:ShortAcronymsShouldBeUppercase", Scope="type", Target="System.ComponentModel.Design.CommandID")]
|
||||
[assembly: SuppressMessage("Microsoft.Naming", "CA1706:ShortAcronymsShouldBeUppercase", Scope="member", Target="System.ComponentModel.Design.CommandID.ID")]
|
||||
[assembly: SuppressMessage("Microsoft.Naming", "CA1706:ShortAcronymsShouldBeUppercase", Scope="member", Target="System.ComponentModel.Design.MenuCommand.CommandID")]
|
||||
|
||||
// Rules in error. - classes don't have any security demands (including base classes and interfaces).
|
||||
[assembly: SuppressMessage("Microsoft.Security", "CA2109:ReviewVisibleEventHandlers", Scope="member", Target="System.Configuration.ApplicationSettingsBase.OnSettingChanging(System.Object,System.Configuration.SettingChangingEventArgs):System.Void")]
|
||||
[assembly: SuppressMessage("Microsoft.Security", "CA2109:ReviewVisibleEventHandlers", Scope="member", Target="System.Configuration.ApplicationSettingsBase.OnSettingsLoaded(System.Object,System.Configuration.SettingsLoadedEventArgs):System.Void")]
|
||||
[assembly: SuppressMessage("Microsoft.Security", "CA2109:ReviewVisibleEventHandlers", Scope="member", Target="System.Configuration.ApplicationSettingsBase.OnSettingsSaving(System.Object,System.ComponentModel.CancelEventArgs):System.Void")]
|
||||
[assembly: SuppressMessage("Microsoft.Security", "CA2109:ReviewVisibleEventHandlers", Scope="member", Target="System.Configuration.ApplicationSettingsBase.OnPropertyChanged(System.Object,System.ComponentModel.PropertyChangedEventArgs):System.Void")]
|
||||
|
||||
// These are Win32, in 64-bit plats the upper half is not used.
|
||||
[assembly: SuppressMessage("Microsoft.Portability", "CA1901:PInvokeDeclarationsShouldBePortable", Scope="member", Target="Microsoft.Win32.NativeMethods.RegOpenKeyEx(System.Runtime.InteropServices.HandleRef,System.String,System.IntPtr,System.Int32,System.IntPtr&):System.Int32")]
|
||||
[assembly: SuppressMessage("Microsoft.Portability", "CA1901:PInvokeDeclarationsShouldBePortable", Scope="member", Target="Microsoft.Win32.NativeMethods.SetThreadAffinityMask(System.Runtime.InteropServices.HandleRef,System.Runtime.InteropServices.HandleRef):System.Boolean")]
|
||||
[assembly: SuppressMessage("Microsoft.Portability", "CA1901:PInvokeDeclarationsShouldBePortable", Scope="member", Target="Microsoft.Win32.UnsafeNativeMethods.DispatchMessage(Microsoft.Win32.NativeMethods+MSG&):System.Int32")]
|
||||
[assembly: SuppressMessage("Microsoft.Portability", "CA1901:PInvokeDeclarationsShouldBePortable", Scope="member", Target="Microsoft.Win32.UnsafeNativeMethods.SetWindowLong(System.Runtime.InteropServices.HandleRef,System.Int32,System.Runtime.InteropServices.HandleRef):System.IntPtr")]
|
||||
[assembly: SuppressMessage("Microsoft.Portability", "CA1901:PInvokeDeclarationsShouldBePortable", Scope="member", Target="Microsoft.Win32.UnsafeNativeMethods.SetWindowLong(System.Runtime.InteropServices.HandleRef,System.Int32,System.Runtime.InteropServices.HandleRef):System.IntPtr")]
|
||||
[assembly: SuppressMessage("Microsoft.Portability", "CA1901:PInvokeDeclarationsShouldBePortable", Scope="member", Target="Microsoft.Win32.UnsafeNativeMethods.UnregisterClass(System.String,System.Runtime.InteropServices.HandleRef):System.Int16")]
|
||||
[assembly: SuppressMessage("Microsoft.Portability", "CA1901:PInvokeDeclarationsShouldBePortable", Scope="member", Target="Microsoft.Win32.UnsafeNativeMethods.MsgWaitForMultipleObjects(System.Int32,System.Int32,System.Boolean,System.Int32,System.Int32):System.Int32")]
|
||||
[assembly: SuppressMessage("Microsoft.Portability", "CA1901:PInvokeDeclarationsShouldBePortable", Scope="member", Target="Microsoft.Win32.UnsafeNativeMethods.GetModuleFileName(System.Int32,System.Text.StringBuilder,System.Int32):System.Int32")]
|
||||
|
||||
// These are safe - no threat on Win9x
|
||||
[assembly: SuppressMessage("Microsoft.Security", "CA2101:SpecifyMarshalingForPInvokeStringArguments", Scope="member", Target="Microsoft.Win32.NativeMethods.CreateNamedPipe(System.String,System.Int32,System.Int32,System.Int32,System.Int32,System.Int32,System.Int32,Microsoft.Win32.NativeMethods+SECURITY_ATTRIBUTES):System.IntPtr")]
|
||||
[assembly: SuppressMessage("Microsoft.Security", "CA2101:SpecifyMarshalingForPInvokeStringArguments", Scope="member", Target="Microsoft.Win32.NativeMethods.LookupPrivilegeValue(System.String,System.String,Microsoft.Win32.NativeMethods+LUID&):System.Boolean")]
|
||||
[assembly: SuppressMessage("Microsoft.Security", "CA2101:SpecifyMarshalingForPInvokeStringArguments", Scope="member", Target="Microsoft.Win32.NativeMethods.GetRequestedRuntimeInfo(System.String,System.String,System.String,System.UInt32,System.UInt32,System.Text.StringBuilder,System.Int32,System.UInt32&,System.Text.StringBuilder,System.Int32,System.UInt32&):System.UInt32")]
|
||||
[assembly: SuppressMessage("Microsoft.Security", "CA2101:SpecifyMarshalingForPInvokeStringArguments", Scope="member", Target="Microsoft.Win32.NativeMethods.LogonUser(System.String,System.String,System.String,System.Int32,System.Int32,System.IntPtr&):System.Boolean")]
|
||||
[assembly: SuppressMessage("Microsoft.Security", "CA2101:SpecifyMarshalingForPInvokeStringArguments", Scope="member", Target="Microsoft.Win32.NativeMethods.CreateProcessWithLogonW(System.String,System.String,System.IntPtr,Microsoft.Win32.NativeMethods+LogonFlags,System.String,System.Text.StringBuilder,System.Int32,System.IntPtr,System.String,Microsoft.Win32.NativeMethods+STARTUPINFO,Microsoft.Win32.SafeNativeMethods+PROCESS_INFORMATION):System.Boolean")]
|
||||
[assembly: SuppressMessage("Microsoft.Security", "CA2101:SpecifyMarshalingForPInvokeStringArguments", Scope="member", Target="Microsoft.Win32.NativeMethods.GetModuleFileNameEx(System.Runtime.InteropServices.HandleRef,System.Runtime.InteropServices.HandleRef,System.Text.StringBuilder,System.Int32):System.Int32")]
|
||||
[assembly: SuppressMessage("Microsoft.Security", "CA2101:SpecifyMarshalingForPInvokeStringArguments", Scope="member", Target="Microsoft.Win32.NativeMethods.GetModuleBaseName(System.Runtime.InteropServices.HandleRef,System.Runtime.InteropServices.HandleRef,System.Text.StringBuilder,System.Int32):System.Int32")]
|
||||
[assembly: SuppressMessage("Microsoft.Security", "CA2101:SpecifyMarshalingForPInvokeStringArguments", Scope="member", Target="Microsoft.Win32.NativeMethods.GetModuleHandle(System.String):System.IntPtr")]
|
||||
[assembly: SuppressMessage("Microsoft.Security", "CA2101:SpecifyMarshalingForPInvokeStringArguments", Scope="member", Target="Microsoft.Win32.SafeNativeMethods.GetComputerName(System.Text.StringBuilder,System.Int32[]):System.Boolean")]
|
||||
[assembly: SuppressMessage("Microsoft.Security", "CA2101:SpecifyMarshalingForPInvokeStringArguments", Scope="member", Target="Microsoft.Win32.SafeNativeMethods.MessageBox(System.Runtime.InteropServices.HandleRef,System.String,System.String,System.Int32):System.Int32")]
|
||||
[assembly: SuppressMessage("Microsoft.Security", "CA2101:SpecifyMarshalingForPInvokeStringArguments", Scope="member", Target="Microsoft.Win32.SafeNativeMethods.OutputDebugString(System.String):System.Void")]
|
||||
[assembly: SuppressMessage("Microsoft.Security", "CA2101:SpecifyMarshalingForPInvokeStringArguments", Scope="member", Target="Microsoft.Win32.UnsafeNativeMethods.VerLanguageName(System.Int32,System.Text.StringBuilder,System.Int32):System.Int32")]
|
||||
[assembly: SuppressMessage("Microsoft.Security", "CA2101:SpecifyMarshalingForPInvokeStringArguments", Scope="member", Target="Microsoft.Win32.UnsafeNativeMethods.GetProcAddress(System.Runtime.InteropServices.HandleRef,System.String):System.IntPtr")]
|
||||
[assembly: SuppressMessage("Microsoft.Security", "CA2101:SpecifyMarshalingForPInvokeStringArguments", Scope="member", Target="Microsoft.Win32.UnsafeNativeMethods.GetModuleHandle(System.String):System.IntPtr")]
|
||||
[assembly: SuppressMessage("Microsoft.Security", "CA2101:SpecifyMarshalingForPInvokeStringArguments", Scope="member", Target="Microsoft.Win32.UnsafeNativeMethods.VerQueryValue(System.Runtime.InteropServices.HandleRef,System.String,System.IntPtr&,System.Int32&):System.Boolean")]
|
||||
[assembly: SuppressMessage("Microsoft.Security", "CA2101:SpecifyMarshalingForPInvokeStringArguments", Scope="member", Target="Microsoft.Win32.UnsafeNativeMethods.CreateFile(System.String,System.Int32,System.Int32,System.IntPtr,System.Int32,System.Int32,System.IntPtr):Microsoft.Win32.SafeHandles.SafeFileHandle")]
|
||||
|
||||
|
||||
// SafeHandles.
|
||||
[assembly: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="System.Runtime.InteropServices.ComTypes.FORMATETC.ptd")]
|
||||
[assembly: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="System.Runtime.InteropServices.ComTypes.STGMEDIUM.unionmember")]
|
||||
[assembly: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="Microsoft.Win32.NativeMethods+WNDCLASS_I.hbrBackground")]
|
||||
[assembly: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="Microsoft.Win32.NativeMethods+WNDCLASS_I.lpszMenuName")]
|
||||
[assembly: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="Microsoft.Win32.NativeMethods+WNDCLASS_I.hIcon")]
|
||||
[assembly: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="Microsoft.Win32.NativeMethods+WNDCLASS_I.hInstance")]
|
||||
[assembly: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="Microsoft.Win32.NativeMethods+WNDCLASS_I.lpszClassName")]
|
||||
[assembly: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="Microsoft.Win32.NativeMethods+WNDCLASS_I.lpfnWndProc")]
|
||||
[assembly: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="Microsoft.Win32.NativeMethods+WNDCLASS_I.hCursor")]
|
||||
[assembly: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="Microsoft.Win32.NativeMethods+WNDCLASS.hbrBackground")]
|
||||
[assembly: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="Microsoft.Win32.NativeMethods+WNDCLASS.hIcon")]
|
||||
[assembly: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="Microsoft.Win32.NativeMethods+WNDCLASS.hInstance")]
|
||||
[assembly: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="Microsoft.Win32.NativeMethods+WNDCLASS.hCursor")]
|
||||
[assembly: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="Microsoft.Win32.TimerElapsedEventArgs.timerId")]
|
||||
[assembly: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="Microsoft.Win32.NativeMethods+ShellExecuteInfo.hInstApp")]
|
||||
[assembly: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="Microsoft.Win32.NativeMethods+ShellExecuteInfo.lpDirectory")]
|
||||
[assembly: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="Microsoft.Win32.NativeMethods+ShellExecuteInfo.hIcon")]
|
||||
[assembly: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="Microsoft.Win32.NativeMethods+ShellExecuteInfo.lpClass")]
|
||||
[assembly: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="Microsoft.Win32.NativeMethods+ShellExecuteInfo.lpParameters")]
|
||||
[assembly: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="Microsoft.Win32.NativeMethods+ShellExecuteInfo.hkeyClass")]
|
||||
[assembly: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="Microsoft.Win32.NativeMethods+ShellExecuteInfo.lpIDList")]
|
||||
[assembly: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="Microsoft.Win32.NativeMethods+ShellExecuteInfo.hwnd")]
|
||||
[assembly: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="Microsoft.Win32.NativeMethods+ShellExecuteInfo.lpFile")]
|
||||
[assembly: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="Microsoft.Win32.NativeMethods+ShellExecuteInfo.lpVerb")]
|
||||
[assembly: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="Microsoft.Win32.NativeMethods+ShellExecuteInfo.hProcess")]
|
||||
[assembly: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="Microsoft.Win32.NativeMethods.INVALID_HANDLE_VALUE")]
|
||||
[assembly: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="Microsoft.Win32.NativeMethods.NullHandleRef")]
|
||||
[assembly: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="Microsoft.Win32.NativeMethods.HKEY_LOCAL_MACHINE")]
|
||||
[assembly: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="Microsoft.Win32.NativeMethods.InvalidIntPtr")]
|
||||
[assembly: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="Microsoft.Win32.NativeMethods+NtProcessBasicInfo.InheritedFromUniqueProcessId")]
|
||||
[assembly: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="Microsoft.Win32.NativeMethods+NtProcessBasicInfo.UniqueProcessId")]
|
||||
[assembly: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="Microsoft.Win32.NativeMethods+NtProcessBasicInfo.AffinityMask")]
|
||||
[assembly: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="Microsoft.Win32.NativeMethods+NtProcessBasicInfo.PebBaseAddress")]
|
||||
[assembly: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="Microsoft.Win32.NativeMethods+WinModuleEntry.modBaseAddr")]
|
||||
[assembly: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="Microsoft.Win32.NativeMethods+WinModuleEntry.hModule")]
|
||||
[assembly: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="Microsoft.Win32.NativeMethods+NtModuleInfo.BaseOfDll")]
|
||||
[assembly: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="Microsoft.Win32.NativeMethods+NtModuleInfo.EntryPoint")]
|
||||
[assembly: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="Microsoft.Win32.NativeMethods+SECURITY_ATTRIBUTES.lpSecurityDescriptor")]
|
||||
[assembly: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="Microsoft.Win32.NativeMethods+MSG.lParam")]
|
||||
[assembly: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="Microsoft.Win32.NativeMethods+MSG.wParam")]
|
||||
[assembly: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="Microsoft.Win32.NativeMethods+MSG.hwnd")]
|
||||
[assembly: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="Microsoft.Win32.NativeMethods+STARTUPINFO.lpReserved2")]
|
||||
[assembly: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="Microsoft.Win32.NativeMethods+STARTUPINFO.lpReserved")]
|
||||
[assembly: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="Microsoft.Win32.NativeMethods+STARTUPINFO.lpDesktop")]
|
||||
[assembly: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="Microsoft.Win32.NativeMethods+STARTUPINFO.lpTitle")]
|
||||
[assembly: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="Microsoft.Win32.NativeMethods+STARTUPINFO.hStdError")]
|
||||
[assembly: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="Microsoft.Win32.NativeMethods+STARTUPINFO.hStdOutput")]
|
||||
[assembly: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="Microsoft.Win32.NativeMethods+STARTUPINFO.hStdInput")]
|
||||
[assembly: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="Microsoft.Win32.SafeNativeMethods+PROCESS_INFORMATION.hThread")]
|
||||
[assembly: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="Microsoft.Win32.SafeNativeMethods+PROCESS_INFORMATION.hProcess")]
|
||||
[assembly: SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources", Scope="member", Target="Microsoft.Win32.NativeMethods+WinProcessEntry.th32DefaultHeapID")]
|
||||
|
||||
|
@@ -0,0 +1,63 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <copyright file="IAdviseSink.cs" company="Microsoft">
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// </copyright>
|
||||
//------------------------------------------------------------------------------
|
||||
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1045:DoNotPassTypesByReference", Scope="member", Target="System.Runtime.InteropServices.ComTypes.IAdviseSink.OnDataChange(System.Runtime.InteropServices.ComTypes.FORMATETC&,System.Runtime.InteropServices.ComTypes.STGMEDIUM&):System.Void")]
|
||||
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1045:DoNotPassTypesByReference", Scope="member", Target="System.Runtime.InteropServices.ComTypes.IAdviseSink.OnDataChange(System.Runtime.InteropServices.ComTypes.FORMATETC&,System.Runtime.InteropServices.ComTypes.STGMEDIUM&):System.Void")]
|
||||
|
||||
namespace System.Runtime.InteropServices.ComTypes {
|
||||
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
/// <devdoc>
|
||||
/// The IAdviseSink interface enables containers and other objects to
|
||||
/// receive notifications of data changes, view changes, and compound-document
|
||||
/// changes occurring in objects of interest. Container applications, for
|
||||
/// example, require such notifications to keep cached presentations of their
|
||||
/// linked and embedded objects up-to-date. Calls to IAdviseSink methods are
|
||||
/// asynchronous, so the call is sent and then the next instruction is executed
|
||||
/// without waiting for the call's return.
|
||||
/// </devdoc>
|
||||
[ComImport()]
|
||||
[Guid("0000010F-0000-0000-C000-000000000046")]
|
||||
[InterfaceTypeAttribute(ComInterfaceType.InterfaceIsIUnknown)]
|
||||
public interface IAdviseSink {
|
||||
|
||||
/// <devdoc>
|
||||
/// Called by the server to notify a data object's currently registered
|
||||
/// advise sinks that data in the object has changed.
|
||||
/// </devdoc>
|
||||
[PreserveSig]
|
||||
void OnDataChange([In] ref FORMATETC format, [In] ref STGMEDIUM stgmedium);
|
||||
|
||||
/// <devdoc>
|
||||
/// Notifies an object's registered advise sinks that its view has changed.
|
||||
/// </devdoc>
|
||||
[PreserveSig]
|
||||
void OnViewChange(int aspect, int index);
|
||||
|
||||
/// <devdoc>
|
||||
/// Called by the server to notify all registered advisory sinks that
|
||||
/// the object has been renamed.
|
||||
/// </devdoc>
|
||||
[PreserveSig]
|
||||
void OnRename(IMoniker moniker);
|
||||
|
||||
/// <devdoc>
|
||||
/// Called by the server to notify all registered advisory sinks that
|
||||
/// the object has been saved.
|
||||
/// </devdoc>
|
||||
[PreserveSig]
|
||||
void OnSave();
|
||||
|
||||
/// <devdoc>
|
||||
/// Called by the server to notify all registered advisory sinks that the
|
||||
/// object has changed from the running to the loaded state.
|
||||
/// </devdoc>
|
||||
[PreserveSig]
|
||||
void OnClose();
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -0,0 +1,98 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <copyright file="IDataObject.cs" company="Microsoft">
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// </copyright>
|
||||
//------------------------------------------------------------------------------
|
||||
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1045:DoNotPassTypesByReference", Scope="member", Target="System.Runtime.InteropServices.ComTypes.IDataObject.GetDataHere(System.Runtime.InteropServices.ComTypes.FORMATETC&,System.Runtime.InteropServices.ComTypes.STGMEDIUM&):System.Void")]
|
||||
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1045:DoNotPassTypesByReference", Scope="member", Target="System.Runtime.InteropServices.ComTypes.IDataObject.GetDataHere(System.Runtime.InteropServices.ComTypes.FORMATETC&,System.Runtime.InteropServices.ComTypes.STGMEDIUM&):System.Void")]
|
||||
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1045:DoNotPassTypesByReference", Scope="member", Target="System.Runtime.InteropServices.ComTypes.IDataObject.QueryGetData(System.Runtime.InteropServices.ComTypes.FORMATETC&):System.Int32")]
|
||||
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1045:DoNotPassTypesByReference", Scope="member", Target="System.Runtime.InteropServices.ComTypes.IDataObject.DAdvise(System.Runtime.InteropServices.ComTypes.FORMATETC&,System.Runtime.InteropServices.ComTypes.ADVF,System.Runtime.InteropServices.ComTypes.IAdviseSink,System.Int32&):System.Int32")]
|
||||
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1045:DoNotPassTypesByReference", Scope="member", Target="System.Runtime.InteropServices.ComTypes.IDataObject.GetData(System.Runtime.InteropServices.ComTypes.FORMATETC&,System.Runtime.InteropServices.ComTypes.STGMEDIUM&):System.Void")]
|
||||
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1045:DoNotPassTypesByReference", Scope="member", Target="System.Runtime.InteropServices.ComTypes.IDataObject.SetData(System.Runtime.InteropServices.ComTypes.FORMATETC&,System.Runtime.InteropServices.ComTypes.STGMEDIUM&,System.Boolean):System.Void")]
|
||||
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1045:DoNotPassTypesByReference", Scope="member", Target="System.Runtime.InteropServices.ComTypes.IDataObject.SetData(System.Runtime.InteropServices.ComTypes.FORMATETC&,System.Runtime.InteropServices.ComTypes.STGMEDIUM&,System.Boolean):System.Void")]
|
||||
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1045:DoNotPassTypesByReference", Scope="member", Target="System.Runtime.InteropServices.ComTypes.IDataObject.GetCanonicalFormatEtc(System.Runtime.InteropServices.ComTypes.FORMATETC&,System.Runtime.InteropServices.ComTypes.FORMATETC&):System.Int32")]
|
||||
|
||||
namespace System.Runtime.InteropServices.ComTypes {
|
||||
|
||||
/// <devdoc>
|
||||
/// The IDataObject interface specifies methods that enable data transfer
|
||||
/// and notification of changes in data. Data transfer methods specify
|
||||
/// the format of the transferred data along with the medium through
|
||||
/// which the data is to be transferred. Optionally, the data can be
|
||||
/// rendered for a specific target device. In addition to methods for
|
||||
/// retrieving and storing data, the IDataObject interface specifies
|
||||
/// methods for enumerating available formats and managing connections
|
||||
/// to advisory sinks for handling change notifications.
|
||||
/// </devdoc>
|
||||
[ComImport()]
|
||||
[Guid("0000010E-0000-0000-C000-000000000046")]
|
||||
[InterfaceTypeAttribute(ComInterfaceType.InterfaceIsIUnknown)]
|
||||
public interface IDataObject {
|
||||
|
||||
/// <devdoc>
|
||||
/// Called by a data consumer to obtain data from a source data object.
|
||||
/// The GetData method renders the data described in the specified FORMATETC
|
||||
/// structure and transfers it through the specified STGMEDIUM structure.
|
||||
/// The caller then assumes responsibility for releasing the STGMEDIUM structure.
|
||||
/// </devdoc>
|
||||
void GetData([In] ref FORMATETC format, out STGMEDIUM medium);
|
||||
|
||||
/// <devdoc>
|
||||
/// Called by a data consumer to obtain data from a source data object.
|
||||
/// This method differs from the GetData method in that the caller must
|
||||
/// allocate and free the specified storage medium.
|
||||
/// </devdoc>
|
||||
void GetDataHere([In] ref FORMATETC format, ref STGMEDIUM medium);
|
||||
|
||||
/// <devdoc>
|
||||
/// Determines whether the data object is capable of rendering the data
|
||||
/// described in the FORMATETC structure. Objects attempting a paste or
|
||||
/// drop operation can call this method before calling IDataObject::GetData
|
||||
/// to get an indication of whether the operation may be successful.
|
||||
/// </devdoc>
|
||||
[PreserveSig]
|
||||
int QueryGetData([In] ref FORMATETC format);
|
||||
|
||||
/// <devdoc>
|
||||
/// Provides a standard FORMATETC structure that is logically equivalent to one that is more
|
||||
/// complex. You use this method to determine whether two different
|
||||
/// FORMATETC structures would return the same data, removing the need
|
||||
/// for duplicate rendering.
|
||||
/// </devdoc>
|
||||
[PreserveSig]
|
||||
int GetCanonicalFormatEtc([In] ref FORMATETC formatIn, out FORMATETC formatOut);
|
||||
|
||||
/// <devdoc>
|
||||
/// Called by an object containing a data source to transfer data to
|
||||
/// the object that implements this method.
|
||||
/// </devdoc>
|
||||
void SetData([In] ref FORMATETC formatIn, [In] ref STGMEDIUM medium, [MarshalAs(UnmanagedType.Bool)] bool release);
|
||||
|
||||
/// <devdoc>
|
||||
/// Creates an object for enumerating the FORMATETC structures for a
|
||||
/// data object. These structures are used in calls to IDataObject::GetData
|
||||
/// or IDataObject::SetData.
|
||||
/// </devdoc>
|
||||
IEnumFORMATETC EnumFormatEtc(DATADIR direction);
|
||||
|
||||
/// <devdoc>
|
||||
/// Called by an object supporting an advise sink to create a connection between
|
||||
/// a data object and the advise sink. This enables the advise sink to be
|
||||
/// notified of changes in the data of the object.
|
||||
/// </devdoc>
|
||||
[PreserveSig]
|
||||
int DAdvise([In] ref FORMATETC pFormatetc, ADVF advf, IAdviseSink adviseSink, out int connection);
|
||||
|
||||
/// <devdoc>
|
||||
/// Destroys a notification connection that had been previously set up.
|
||||
/// </devdoc>
|
||||
void DUnadvise(int connection);
|
||||
|
||||
/// <devdoc>
|
||||
/// Creates an object that can be used to enumerate the current advisory connections.
|
||||
/// </devdoc>
|
||||
[PreserveSig]
|
||||
int EnumDAdvise(out IEnumSTATDATA enumAdvise);
|
||||
}
|
||||
}
|
||||
|
@@ -0,0 +1,51 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <copyright file="IEnumFORMATETC.cs" company="Microsoft">
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// </copyright>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace System.Runtime.InteropServices.ComTypes {
|
||||
|
||||
/// <devdoc>
|
||||
/// The IEnumFORMATETC interface is used to enumerate an array of FORMATETC
|
||||
/// structures. IEnumFORMATETC has the same methods as all enumerator interfaces:
|
||||
/// Next, Skip, Reset, and Clone.
|
||||
/// </devdoc>
|
||||
[ComImport()]
|
||||
[Guid("00000103-0000-0000-C000-000000000046")]
|
||||
[InterfaceTypeAttribute(ComInterfaceType.InterfaceIsIUnknown)]
|
||||
public interface IEnumFORMATETC {
|
||||
|
||||
/// <devdoc>
|
||||
/// Retrieves the next celt items in the enumeration sequence. If there are
|
||||
/// fewer than the requested number of elements left in the sequence, it
|
||||
/// retrieves the remaining elements. The number of elements actually
|
||||
/// retrieved is returned through pceltFetched (unless the caller passed
|
||||
/// in NULL for that parameter).
|
||||
/// </devdoc>
|
||||
[PreserveSig]
|
||||
int Next(int celt, [Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex=0)] FORMATETC[] rgelt, [Out, MarshalAs(UnmanagedType.LPArray)] int[] pceltFetched);
|
||||
|
||||
/// <devdoc>
|
||||
/// Skips over the next specified number of elements in the enumeration sequence.
|
||||
/// </devdoc>
|
||||
[PreserveSig]
|
||||
int Skip(int celt);
|
||||
|
||||
/// <devdoc>
|
||||
/// Resets the enumeration sequence to the beginning.
|
||||
/// </devdoc>
|
||||
[PreserveSig]
|
||||
int Reset();
|
||||
|
||||
/// <devdoc>
|
||||
/// Creates another enumerator that contains the same enumeration state as
|
||||
/// the current one. Using this function, a client can record a particular
|
||||
/// point in the enumeration sequence and then return to that point at a
|
||||
/// later time. The new enumerator supports the same interface as the original one.
|
||||
/// </devdoc>
|
||||
void Clone(out IEnumFORMATETC newEnum);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -0,0 +1,52 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <copyright file="IEnumSTATDATA.cs" company="Microsoft">
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// </copyright>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace System.Runtime.InteropServices.ComTypes {
|
||||
|
||||
/// <devdoc>
|
||||
/// The IEnumSTATDATA interface is used to enumerate through an array of
|
||||
/// STATDATA structures, which contain advisory connection information for
|
||||
/// a data object. IEnumSTATDATA has the same methods as all enumerator
|
||||
/// interfaces: Next, Skip, Reset, and Clone.
|
||||
/// </devdoc>
|
||||
[ComImport()]
|
||||
[Guid("00000103-0000-0000-C000-000000000046")]
|
||||
[InterfaceTypeAttribute(ComInterfaceType.InterfaceIsIUnknown)]
|
||||
public interface IEnumSTATDATA {
|
||||
|
||||
/// <devdoc>
|
||||
/// Retrieves the next celt items in the enumeration sequence. If there are
|
||||
/// fewer than the requested number of elements left in the sequence, it
|
||||
/// retrieves the remaining elements. The number of elements actually
|
||||
/// retrieved is returned through pceltFetched (unless the caller passed
|
||||
/// in NULL for that parameter).
|
||||
/// </devdoc>
|
||||
[PreserveSig]
|
||||
int Next(int celt, [Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex=0)] STATDATA[] rgelt, [Out, MarshalAs(UnmanagedType.LPArray, SizeConst=1)] int[] pceltFetched);
|
||||
|
||||
/// <devdoc>
|
||||
/// Skips over the next specified number of elements in the enumeration sequence.
|
||||
/// </devdoc>
|
||||
[PreserveSig]
|
||||
int Skip(int celt);
|
||||
|
||||
/// <devdoc>
|
||||
/// Resets the enumeration sequence to the beginning.
|
||||
/// </devdoc>
|
||||
[PreserveSig]
|
||||
int Reset();
|
||||
|
||||
/// <devdoc>
|
||||
/// Creates another enumerator that contains the same enumeration state as
|
||||
/// the current one. Using this function, a client can record a particular
|
||||
/// point in the enumeration sequence and then return to that point at a
|
||||
/// later time. The new enumerator supports the same interface as the original one.
|
||||
/// </devdoc>
|
||||
void Clone(out IEnumSTATDATA newEnum);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -0,0 +1,21 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <copyright file="STATDATA.cs" company="Microsoft">
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// </copyright>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace System.Runtime.InteropServices.ComTypes {
|
||||
|
||||
using System;
|
||||
|
||||
/// <devdoc>
|
||||
/// </devdoc>
|
||||
public struct STATDATA {
|
||||
public FORMATETC formatetc;
|
||||
public ADVF advf;
|
||||
public IAdviseSink advSink;
|
||||
public int connection;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -0,0 +1,21 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <copyright file="STGMEDIUM.cs" company="Microsoft">
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// </copyright>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace System.Runtime.InteropServices.ComTypes {
|
||||
|
||||
using System;
|
||||
|
||||
/// <devdoc>
|
||||
/// </devdoc>
|
||||
public struct STGMEDIUM {
|
||||
public TYMED tymed;
|
||||
public IntPtr unionmember;
|
||||
[MarshalAs(UnmanagedType.IUnknown)]
|
||||
public object pUnkForRelease;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -0,0 +1,26 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <copyright file="TYMED.cs" company="Microsoft">
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// </copyright>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace System.Runtime.InteropServices.ComTypes {
|
||||
|
||||
using System;
|
||||
|
||||
/// <devdoc>
|
||||
/// </devdoc>
|
||||
[Flags]
|
||||
public enum TYMED {
|
||||
TYMED_HGLOBAL = 1,
|
||||
TYMED_FILE = 2,
|
||||
TYMED_ISTREAM = 4,
|
||||
TYMED_ISTORAGE = 8,
|
||||
TYMED_GDI = 16,
|
||||
TYMED_MFPICT = 32,
|
||||
TYMED_ENHMF = 64,
|
||||
TYMED_NULL = 0
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -0,0 +1,148 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <copyright file="COM2AboutBoxPropertyDescriptor.cs" company="Microsoft">
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// </copyright>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace System.Runtime.InteropServices {
|
||||
using System.Diagnostics;
|
||||
using System;
|
||||
using Microsoft.Win32;
|
||||
using System.Security;
|
||||
using System.Security.Permissions;
|
||||
|
||||
/// <include file='doc\StandardOleMarshalObject.uex' path='docs/doc[@for="StandardOleMarshalObject"]/*' />
|
||||
/// <internalonly/>
|
||||
/// <devdoc>
|
||||
/// Replaces the standard CLR free-threaded marshaler with the standard OLE STA one. This prevents the calls made into
|
||||
/// our hosting object by OLE from coming in on threads other than the UI thread.
|
||||
///
|
||||
/// </devdoc>
|
||||
[ComVisible(true)]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Interoperability", "CA1403:AutoLayoutTypesShouldNotBeComVisible")]
|
||||
public class StandardOleMarshalObject : MarshalByRefObject, UnsafeNativeMethods.IMarshal
|
||||
{
|
||||
static readonly Guid CLSID_StdMarshal = new Guid("00000017-0000-0000-c000-000000000046");
|
||||
|
||||
[SuppressUnmanagedCodeSecurity]
|
||||
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
|
||||
private delegate int GetMarshalSizeMax_Delegate(IntPtr _this, ref Guid riid, IntPtr pv, int dwDestContext, IntPtr pvDestContext, int mshlflags, out int pSize);
|
||||
|
||||
[SuppressUnmanagedCodeSecurity]
|
||||
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
|
||||
private delegate int MarshalInterface_Delegate(IntPtr _this, IntPtr pStm, ref Guid riid, IntPtr pv, int dwDestContext, IntPtr pvDestContext, int mshlflags);
|
||||
|
||||
protected StandardOleMarshalObject()
|
||||
{ }
|
||||
|
||||
[System.Security.Permissions.SecurityPermission(System.Security.Permissions.SecurityAction.Demand, Flags=System.Security.Permissions.SecurityPermissionFlag.UnmanagedCode)]
|
||||
private IntPtr GetStdMarshaler(ref Guid riid, int dwDestContext, int mshlflags)
|
||||
{
|
||||
IntPtr pStandardMarshal = IntPtr.Zero;
|
||||
|
||||
IntPtr pUnk = Marshal.GetIUnknownForObject(this);
|
||||
if (pUnk != IntPtr.Zero)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (NativeMethods.S_OK == UnsafeNativeMethods.CoGetStandardMarshal(ref riid, pUnk, dwDestContext, IntPtr.Zero, mshlflags, out pStandardMarshal))
|
||||
{
|
||||
Debug.Assert(pStandardMarshal != null, "Failed to get marshaler for interface '" + riid.ToString() + "', CoGetStandardMarshal returned S_OK");
|
||||
return pStandardMarshal;
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
Marshal.Release(pUnk);
|
||||
}
|
||||
}
|
||||
throw new InvalidOperationException(SR.GetString(SR.StandardOleMarshalObjectGetMarshalerFailed, riid.ToString()));
|
||||
}
|
||||
|
||||
/// <include file='doc\StandardOleMarshalObject.uex' path='docs/doc[@for="StandardOleMarshalObject.UnsafeNativeMethods.IMarshal.GetUnmarshalClass"]/*' />
|
||||
/// <internalonly/>
|
||||
[System.Security.Permissions.SecurityPermission(System.Security.Permissions.SecurityAction.Demand, Flags=System.Security.Permissions.SecurityPermissionFlag.UnmanagedCode)]
|
||||
int UnsafeNativeMethods.IMarshal.GetUnmarshalClass(ref Guid riid, IntPtr pv, int dwDestContext, IntPtr pvDestContext, int mshlflags, out Guid pCid)
|
||||
{
|
||||
pCid = CLSID_StdMarshal;
|
||||
return NativeMethods.S_OK;
|
||||
}
|
||||
|
||||
/// <include file='doc\StandardOleMarshalObject.uex' path='docs/doc[@for="StandardOleMarshalObject.UnsafeNativeMethods.IMarshal.GetMarshalSizeMax"]/*' />
|
||||
/// <internalonly/>
|
||||
[System.Security.Permissions.SecurityPermission(System.Security.Permissions.SecurityAction.Demand, Flags=System.Security.Permissions.SecurityPermissionFlag.UnmanagedCode)]
|
||||
unsafe int UnsafeNativeMethods.IMarshal.GetMarshalSizeMax(ref Guid riid, IntPtr pv, int dwDestContext, IntPtr pvDestContext, int mshlflags, out int pSize)
|
||||
{
|
||||
IntPtr pStandardMarshal = GetStdMarshaler(ref riid, dwDestContext, mshlflags);
|
||||
|
||||
try
|
||||
{
|
||||
// we must not wrap pStandardMarshal with an RCW because that would trigger QIs for random IIDs and the marshaler
|
||||
// (aka stub manager object) does not really handle these well and we would risk triggering an AppVerifier break
|
||||
IntPtr vtable = *(IntPtr*)pStandardMarshal.ToPointer();
|
||||
IntPtr method = *((IntPtr*)vtable.ToPointer() + 4); // GetMarshalSizeMax is 4th slot
|
||||
|
||||
GetMarshalSizeMax_Delegate del = (GetMarshalSizeMax_Delegate)Marshal.GetDelegateForFunctionPointer(method, typeof(GetMarshalSizeMax_Delegate));
|
||||
return del(pStandardMarshal, ref riid, pv, dwDestContext, pvDestContext, mshlflags, out pSize);
|
||||
}
|
||||
finally
|
||||
{
|
||||
Marshal.Release(pStandardMarshal);
|
||||
}
|
||||
}
|
||||
|
||||
/// <include file='doc\StandardOleMarshalObject.uex' path='docs/doc[@for="StandardOleMarshalObject.UnsafeNativeMethods.IMarshal.MarshalInterface"]/*' />
|
||||
/// <internalonly/>
|
||||
[System.Security.Permissions.SecurityPermission(System.Security.Permissions.SecurityAction.Demand, Flags=System.Security.Permissions.SecurityPermissionFlag.UnmanagedCode)]
|
||||
unsafe int UnsafeNativeMethods.IMarshal.MarshalInterface(IntPtr pStm, ref Guid riid, IntPtr pv, int dwDestContext, IntPtr pvDestContext, int mshlflags)
|
||||
{
|
||||
IntPtr pStandardMarshal = GetStdMarshaler(ref riid, dwDestContext, mshlflags);
|
||||
|
||||
try
|
||||
{
|
||||
// we must not wrap pStandardMarshal with an RCW because that would trigger QIs for random IIDs and the marshaler
|
||||
// (aka stub manager object) does not really handle these well and we would risk triggering an AppVerifier break
|
||||
IntPtr vtable = *(IntPtr *)pStandardMarshal.ToPointer();
|
||||
IntPtr method = *((IntPtr *)vtable.ToPointer() + 5); // GetMarshalSizeMax is 5th slot
|
||||
|
||||
MarshalInterface_Delegate del = (MarshalInterface_Delegate)Marshal.GetDelegateForFunctionPointer(method, typeof(MarshalInterface_Delegate));
|
||||
return del(pStandardMarshal, pStm, ref riid, pv, dwDestContext, pvDestContext, mshlflags);
|
||||
}
|
||||
finally
|
||||
{
|
||||
Marshal.Release(pStandardMarshal);
|
||||
}
|
||||
}
|
||||
|
||||
/// <include file='doc\StandardOleMarshalObject.uex' path='docs/doc[@for="StandardOleMarshalObject.UnsafeNativeMethods.IMarshal.UnmarshalInterface"]/*' />
|
||||
/// <internalonly/>
|
||||
[System.Security.Permissions.SecurityPermission(System.Security.Permissions.SecurityAction.Demand, Flags=System.Security.Permissions.SecurityPermissionFlag.UnmanagedCode)]
|
||||
int UnsafeNativeMethods.IMarshal.UnmarshalInterface(IntPtr pStm, ref Guid riid, out IntPtr ppv)
|
||||
{
|
||||
// this should never be called on this interface, but on the standard one handed back by the previous calls.
|
||||
Debug.Fail("IMarshal::UnmarshalInterface should not be called.");
|
||||
ppv = IntPtr.Zero;
|
||||
return NativeMethods.E_NOTIMPL;
|
||||
}
|
||||
|
||||
/// <include file='doc\StandardOleMarshalObject.uex' path='docs/doc[@for="StandardOleMarshalObject.UnsafeNativeMethods.IMarshal.ReleaseMarshalData"]/*' />
|
||||
/// <internalonly/>
|
||||
[System.Security.Permissions.SecurityPermission(System.Security.Permissions.SecurityAction.Demand, Flags=System.Security.Permissions.SecurityPermissionFlag.UnmanagedCode)]
|
||||
int UnsafeNativeMethods.IMarshal.ReleaseMarshalData(IntPtr pStm)
|
||||
{
|
||||
// this should never be called on this interface, but on the standard one handed back by the previous calls.
|
||||
Debug.Fail("IMarshal::ReleaseMarshalData should not be called.");
|
||||
return NativeMethods.E_NOTIMPL;
|
||||
}
|
||||
|
||||
/// <include file='doc\StandardOleMarshalObject.uex' path='docs/doc[@for="StandardOleMarshalObject.UnsafeNativeMethods.IMarshal.DisconnectObject"]/*' />
|
||||
/// <internalonly/>
|
||||
[System.Security.Permissions.SecurityPermission(System.Security.Permissions.SecurityAction.Demand, Flags=System.Security.Permissions.SecurityPermissionFlag.UnmanagedCode)]
|
||||
int UnsafeNativeMethods.IMarshal.DisconnectObject(int dwReserved)
|
||||
{
|
||||
// this should never be called on this interface, but on the standard one handed back by the previous calls.
|
||||
Debug.Fail("IMarshal::DisconnectObject should not be called.");
|
||||
return NativeMethods.E_NOTIMPL;
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,54 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <copyright file="CodeArgumentReferenceExpression.cs" company="Microsoft">
|
||||
//
|
||||
// <OWNER>[....]</OWNER>
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// </copyright>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace System.CodeDom {
|
||||
|
||||
using System.Diagnostics;
|
||||
using System;
|
||||
using Microsoft.Win32;
|
||||
using System.Collections;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
/// <devdoc>
|
||||
/// <para>[To be supplied.]</para>
|
||||
/// </devdoc>
|
||||
[
|
||||
ClassInterface(ClassInterfaceType.AutoDispatch),
|
||||
ComVisible(true),
|
||||
Serializable,
|
||||
]
|
||||
public class CodeArgumentReferenceExpression : CodeExpression {
|
||||
private string parameterName;
|
||||
|
||||
/// <devdoc>
|
||||
/// <para>[To be supplied.]</para>
|
||||
/// </devdoc>
|
||||
public CodeArgumentReferenceExpression() {
|
||||
}
|
||||
|
||||
/// <devdoc>
|
||||
/// <para>[To be supplied.]</para>
|
||||
/// </devdoc>
|
||||
public CodeArgumentReferenceExpression(string parameterName) {
|
||||
this.parameterName = parameterName;
|
||||
}
|
||||
|
||||
|
||||
/// <devdoc>
|
||||
/// <para>[To be supplied.]</para>
|
||||
/// </devdoc>
|
||||
public string ParameterName {
|
||||
get {
|
||||
return (parameterName == null) ? string.Empty : parameterName;
|
||||
}
|
||||
set {
|
||||
parameterName = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,178 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <copyright file="CodeArrayCreateExpression.cs" company="Microsoft">
|
||||
//
|
||||
// <OWNER>[....]</OWNER>
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// </copyright>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace System.CodeDom {
|
||||
|
||||
using System.Diagnostics;
|
||||
using System;
|
||||
using Microsoft.Win32;
|
||||
using System.Collections;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
/// <devdoc>
|
||||
/// <para> Represents
|
||||
/// an expression that creates an array.</para>
|
||||
/// </devdoc>
|
||||
[
|
||||
ClassInterface(ClassInterfaceType.AutoDispatch),
|
||||
ComVisible(true),
|
||||
Serializable,
|
||||
]
|
||||
public class CodeArrayCreateExpression : CodeExpression {
|
||||
private CodeTypeReference createType;
|
||||
private CodeExpressionCollection initializers = new CodeExpressionCollection();
|
||||
private CodeExpression sizeExpression;
|
||||
private int size = 0;
|
||||
|
||||
/// <devdoc>
|
||||
/// <para>
|
||||
/// Initializes a new instance of <see cref='System.CodeDom.CodeArrayCreateExpression'/>.
|
||||
/// </para>
|
||||
/// </devdoc>
|
||||
public CodeArrayCreateExpression() {
|
||||
}
|
||||
|
||||
/// <devdoc>
|
||||
/// <para>
|
||||
/// Initializes a new instance of <see cref='System.CodeDom.CodeArrayCreateExpression'/> with the specified
|
||||
/// array type and initializers.
|
||||
/// </para>
|
||||
/// </devdoc>
|
||||
public CodeArrayCreateExpression(CodeTypeReference createType, params CodeExpression[] initializers) {
|
||||
this.createType = createType;
|
||||
this.initializers.AddRange(initializers);
|
||||
}
|
||||
|
||||
/// <devdoc>
|
||||
/// <para>[To be supplied.]</para>
|
||||
/// </devdoc>
|
||||
public CodeArrayCreateExpression(string createType, params CodeExpression[] initializers) {
|
||||
this.createType = new CodeTypeReference(createType);
|
||||
this.initializers.AddRange(initializers);
|
||||
}
|
||||
|
||||
/// <devdoc>
|
||||
/// <para>[To be supplied.]</para>
|
||||
/// </devdoc>
|
||||
public CodeArrayCreateExpression(Type createType, params CodeExpression[] initializers) {
|
||||
this.createType = new CodeTypeReference(createType);
|
||||
this.initializers.AddRange(initializers);
|
||||
}
|
||||
|
||||
/// <devdoc>
|
||||
/// <para>
|
||||
/// Initializes a new instance of <see cref='System.CodeDom.CodeArrayCreateExpression'/>. with the specified array
|
||||
/// type and size.
|
||||
/// </para>
|
||||
/// </devdoc>
|
||||
public CodeArrayCreateExpression(CodeTypeReference createType, int size) {
|
||||
this.createType = createType;
|
||||
this.size = size;
|
||||
}
|
||||
|
||||
/// <devdoc>
|
||||
/// <para>[To be supplied.]</para>
|
||||
/// </devdoc>
|
||||
public CodeArrayCreateExpression(string createType, int size) {
|
||||
this.createType = new CodeTypeReference(createType);
|
||||
this.size = size;
|
||||
}
|
||||
|
||||
/// <devdoc>
|
||||
/// <para>[To be supplied.]</para>
|
||||
/// </devdoc>
|
||||
public CodeArrayCreateExpression(Type createType, int size) {
|
||||
this.createType = new CodeTypeReference(createType);
|
||||
this.size = size;
|
||||
}
|
||||
|
||||
/// <devdoc>
|
||||
/// <para>
|
||||
/// Initializes a new instance of <see cref='System.CodeDom.CodeArrayCreateExpression'/>. with the specified array
|
||||
/// type and size.
|
||||
/// </para>
|
||||
/// </devdoc>
|
||||
public CodeArrayCreateExpression(CodeTypeReference createType, CodeExpression size) {
|
||||
this.createType = createType;
|
||||
this.sizeExpression = size;
|
||||
}
|
||||
|
||||
/// <devdoc>
|
||||
/// <para>[To be supplied.]</para>
|
||||
/// </devdoc>
|
||||
public CodeArrayCreateExpression(string createType, CodeExpression size) {
|
||||
this.createType = new CodeTypeReference(createType);
|
||||
this.sizeExpression = size;
|
||||
}
|
||||
|
||||
/// <devdoc>
|
||||
/// <para>[To be supplied.]</para>
|
||||
/// </devdoc>
|
||||
public CodeArrayCreateExpression(Type createType, CodeExpression size) {
|
||||
this.createType = new CodeTypeReference(createType);
|
||||
this.sizeExpression = size;
|
||||
}
|
||||
|
||||
/// <devdoc>
|
||||
/// <para>
|
||||
/// Gets or sets
|
||||
/// the type of the array to create.
|
||||
/// </para>
|
||||
/// </devdoc>
|
||||
public CodeTypeReference CreateType {
|
||||
get {
|
||||
if (createType == null) {
|
||||
createType = new CodeTypeReference("");
|
||||
}
|
||||
return createType;
|
||||
}
|
||||
set {
|
||||
createType = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <devdoc>
|
||||
/// <para>
|
||||
/// Gets or sets
|
||||
/// the initializers to initialize the array with.
|
||||
/// </para>
|
||||
/// </devdoc>
|
||||
public CodeExpressionCollection Initializers {
|
||||
get {
|
||||
return initializers;
|
||||
}
|
||||
}
|
||||
|
||||
/// <devdoc>
|
||||
/// <para>
|
||||
/// Gets or sets
|
||||
/// the size of the array.
|
||||
/// </para>
|
||||
/// </devdoc>
|
||||
public int Size {
|
||||
get {
|
||||
return size;
|
||||
}
|
||||
set {
|
||||
size = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <devdoc>
|
||||
/// <para>Gets or sets the size of the array.</para>
|
||||
/// </devdoc>
|
||||
public CodeExpression SizeExpression {
|
||||
get {
|
||||
return sizeExpression;
|
||||
}
|
||||
set {
|
||||
sizeExpression = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,70 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <copyright file="CodeArrayIndexerExpression.cs" company="Microsoft">
|
||||
//
|
||||
// <OWNER>[....]</OWNER>
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// </copyright>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace System.CodeDom {
|
||||
|
||||
using System.Diagnostics;
|
||||
using System;
|
||||
using Microsoft.Win32;
|
||||
using System.Collections;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
/// <devdoc>
|
||||
/// <para>
|
||||
/// Represents an array indexer expression.
|
||||
/// </para>
|
||||
/// </devdoc>
|
||||
[
|
||||
ClassInterface(ClassInterfaceType.AutoDispatch),
|
||||
ComVisible(true),
|
||||
Serializable,
|
||||
]
|
||||
public class CodeArrayIndexerExpression : CodeExpression {
|
||||
private CodeExpression targetObject;
|
||||
private CodeExpressionCollection indices;
|
||||
|
||||
/// <devdoc>
|
||||
/// <para>[To be supplied.]</para>
|
||||
/// </devdoc>
|
||||
public CodeArrayIndexerExpression() {
|
||||
}
|
||||
|
||||
/// <devdoc>
|
||||
/// <para>[To be supplied.]</para>
|
||||
/// </devdoc>
|
||||
public CodeArrayIndexerExpression(CodeExpression targetObject, params CodeExpression[] indices) {
|
||||
this.targetObject = targetObject;
|
||||
this.indices = new CodeExpressionCollection();
|
||||
this.indices.AddRange(indices);
|
||||
}
|
||||
|
||||
/// <devdoc>
|
||||
/// <para>[To be supplied.]</para>
|
||||
/// </devdoc>
|
||||
public CodeExpression TargetObject {
|
||||
get {
|
||||
return targetObject;
|
||||
}
|
||||
set {
|
||||
targetObject = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <devdoc>
|
||||
/// <para>[To be supplied.]</para>
|
||||
/// </devdoc>
|
||||
public CodeExpressionCollection Indices {
|
||||
get {
|
||||
if (indices == null) {
|
||||
indices = new CodeExpressionCollection();
|
||||
}
|
||||
return indices;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,80 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <copyright file="CodeAssignStatement.cs" company="Microsoft">
|
||||
//
|
||||
// <OWNER>[....]</OWNER>
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// </copyright>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace System.CodeDom {
|
||||
|
||||
using System.Diagnostics;
|
||||
using System;
|
||||
using Microsoft.Win32;
|
||||
using System.Collections;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
/// <devdoc>
|
||||
/// <para>
|
||||
/// Represents a simple assignment statement.
|
||||
/// </para>
|
||||
/// </devdoc>
|
||||
[
|
||||
ClassInterface(ClassInterfaceType.AutoDispatch),
|
||||
ComVisible(true),
|
||||
Serializable,
|
||||
]
|
||||
public class CodeAssignStatement : CodeStatement {
|
||||
private CodeExpression left;
|
||||
private CodeExpression right;
|
||||
|
||||
/// <devdoc>
|
||||
/// <para>
|
||||
/// Initializes a new instance of <see cref='System.CodeDom.CodeAssignStatement'/>.
|
||||
/// </para>
|
||||
/// </devdoc>
|
||||
public CodeAssignStatement() {
|
||||
}
|
||||
|
||||
/// <devdoc>
|
||||
/// <para>
|
||||
/// Initializes a new instance of <see cref='System.CodeDom.CodeAssignStatement'/> that represents the
|
||||
/// specified assignment values.
|
||||
/// </para>
|
||||
/// </devdoc>
|
||||
public CodeAssignStatement(CodeExpression left, CodeExpression right) {
|
||||
Left = left;
|
||||
Right = right;
|
||||
}
|
||||
|
||||
/// <devdoc>
|
||||
/// <para>
|
||||
/// Gets or sets
|
||||
/// the variable to be assigned to.
|
||||
/// </para>
|
||||
/// </devdoc>
|
||||
public CodeExpression Left {
|
||||
get {
|
||||
return left;
|
||||
}
|
||||
set {
|
||||
left = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <devdoc>
|
||||
/// <para>
|
||||
/// Gets or sets
|
||||
/// the value to assign.
|
||||
/// </para>
|
||||
/// </devdoc>
|
||||
public CodeExpression Right {
|
||||
get {
|
||||
return right;
|
||||
}
|
||||
set {
|
||||
right = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,88 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <copyright file="CodeAttachEventStatement.cs" company="Microsoft">
|
||||
//
|
||||
// <OWNER>[....]</OWNER>
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// </copyright>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace System.CodeDom {
|
||||
|
||||
using System.Diagnostics;
|
||||
using System;
|
||||
using Microsoft.Win32;
|
||||
using System.Collections;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
/// <devdoc>
|
||||
/// <para>
|
||||
/// Represents a event attach statement.
|
||||
/// </para>
|
||||
/// </devdoc>
|
||||
[
|
||||
ClassInterface(ClassInterfaceType.AutoDispatch),
|
||||
ComVisible(true),
|
||||
Serializable,
|
||||
]
|
||||
public class CodeAttachEventStatement : CodeStatement {
|
||||
private CodeEventReferenceExpression eventRef;
|
||||
private CodeExpression listener;
|
||||
|
||||
/// <devdoc>
|
||||
/// <para>
|
||||
/// Initializes a new instance of <see cref='System.CodeDom.CodeAttachEventStatement'/>.
|
||||
/// </para>
|
||||
/// </devdoc>
|
||||
public CodeAttachEventStatement() {
|
||||
}
|
||||
|
||||
/// <devdoc>
|
||||
/// <para>
|
||||
/// Initializes a new instance of the <see cref='System.CodeDom.CodeAttachEventStatement'/> class using the specified arguments.
|
||||
/// </para>
|
||||
/// </devdoc>
|
||||
public CodeAttachEventStatement(CodeEventReferenceExpression eventRef, CodeExpression listener) {
|
||||
this.eventRef = eventRef;
|
||||
this.listener = listener;
|
||||
}
|
||||
|
||||
/// <devdoc>
|
||||
/// <para>[To be supplied.]</para>
|
||||
/// </devdoc>
|
||||
public CodeAttachEventStatement(CodeExpression targetObject, string eventName, CodeExpression listener) {
|
||||
this.eventRef = new CodeEventReferenceExpression(targetObject, eventName);
|
||||
this.listener = listener;
|
||||
}
|
||||
|
||||
/// <devdoc>
|
||||
/// <para>
|
||||
/// The event to attach a listener to.
|
||||
/// </para>
|
||||
/// </devdoc>
|
||||
public CodeEventReferenceExpression Event {
|
||||
get {
|
||||
if (eventRef == null) {
|
||||
return new CodeEventReferenceExpression();
|
||||
}
|
||||
return eventRef;
|
||||
}
|
||||
set {
|
||||
eventRef = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <devdoc>
|
||||
/// <para>
|
||||
/// The new listener.
|
||||
/// </para>
|
||||
/// </devdoc>
|
||||
public CodeExpression Listener {
|
||||
get {
|
||||
return listener;
|
||||
}
|
||||
set {
|
||||
listener = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,87 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <copyright file="CodeAttributeArgument.cs" company="Microsoft">
|
||||
//
|
||||
// <OWNER>[....]</OWNER>
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// </copyright>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace System.CodeDom {
|
||||
|
||||
using System.Diagnostics;
|
||||
using System;
|
||||
using Microsoft.Win32;
|
||||
using System.Collections;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
/// <devdoc>
|
||||
/// <para>
|
||||
/// Represents an argument for use in a custom attribute declaration.
|
||||
/// </para>
|
||||
/// </devdoc>
|
||||
[
|
||||
ClassInterface(ClassInterfaceType.AutoDispatch),
|
||||
ComVisible(true),
|
||||
Serializable,
|
||||
]
|
||||
public class CodeAttributeArgument {
|
||||
private string name;
|
||||
private CodeExpression value;
|
||||
|
||||
/// <devdoc>
|
||||
/// <para>
|
||||
/// Initializes a new instance of <see cref='System.CodeDom.CodeAttributeArgument'/>.
|
||||
/// </para>
|
||||
/// </devdoc>
|
||||
public CodeAttributeArgument() {
|
||||
}
|
||||
|
||||
/// <devdoc>
|
||||
/// <para>
|
||||
/// Initializes a new instance of <see cref='System.CodeDom.CodeAttributeArgument'/> using the specified value.
|
||||
/// </para>
|
||||
/// </devdoc>
|
||||
public CodeAttributeArgument(CodeExpression value) {
|
||||
Value = value;
|
||||
}
|
||||
|
||||
/// <devdoc>
|
||||
/// <para>
|
||||
/// Initializes a new instance of <see cref='System.CodeDom.CodeAttributeArgument'/> using the specified name and
|
||||
/// value.
|
||||
/// </para>
|
||||
/// </devdoc>
|
||||
public CodeAttributeArgument(string name, CodeExpression value) {
|
||||
Name = name;
|
||||
Value = value;
|
||||
}
|
||||
|
||||
/// <devdoc>
|
||||
/// <para>
|
||||
/// The name of the attribute.
|
||||
/// </para>
|
||||
/// </devdoc>
|
||||
public string Name {
|
||||
get {
|
||||
return (name == null) ? string.Empty : name;
|
||||
}
|
||||
set {
|
||||
name = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <devdoc>
|
||||
/// <para>
|
||||
/// The argument for the attribute.
|
||||
/// </para>
|
||||
/// </devdoc>
|
||||
public CodeExpression Value {
|
||||
get {
|
||||
return value;
|
||||
}
|
||||
set {
|
||||
this.value = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,139 @@
|
||||
// ------------------------------------------------------------------------------
|
||||
// <copyright file="CodeAttributeArgumentCollection.cs" company="Microsoft">
|
||||
//
|
||||
// <OWNER>[....]</OWNER>
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// </copyright>
|
||||
// ------------------------------------------------------------------------------
|
||||
//
|
||||
namespace System.CodeDom {
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
|
||||
/// <devdoc>
|
||||
/// <para>
|
||||
/// A collection that stores <see cref='System.CodeDom.CodeAttributeArgument'/> objects.
|
||||
/// </para>
|
||||
/// </devdoc>
|
||||
[
|
||||
ClassInterface(ClassInterfaceType.AutoDispatch),
|
||||
ComVisible(true),
|
||||
Serializable,
|
||||
]
|
||||
public class CodeAttributeArgumentCollection : CollectionBase {
|
||||
|
||||
/// <devdoc>
|
||||
/// <para>
|
||||
/// Initializes a new instance of <see cref='System.CodeDom.CodeAttributeArgumentCollection'/>.
|
||||
/// </para>
|
||||
/// </devdoc>
|
||||
public CodeAttributeArgumentCollection() {
|
||||
}
|
||||
|
||||
/// <devdoc>
|
||||
/// <para>
|
||||
/// Initializes a new instance of <see cref='System.CodeDom.CodeAttributeArgumentCollection'/> based on another <see cref='System.CodeDom.CodeAttributeArgumentCollection'/>.
|
||||
/// </para>
|
||||
/// </devdoc>
|
||||
public CodeAttributeArgumentCollection(CodeAttributeArgumentCollection value) {
|
||||
this.AddRange(value);
|
||||
}
|
||||
|
||||
/// <devdoc>
|
||||
/// <para>
|
||||
/// Initializes a new instance of <see cref='System.CodeDom.CodeAttributeArgumentCollection'/> containing any array of <see cref='System.CodeDom.CodeAttributeArgument'/> objects.
|
||||
/// </para>
|
||||
/// </devdoc>
|
||||
public CodeAttributeArgumentCollection(CodeAttributeArgument[] value) {
|
||||
this.AddRange(value);
|
||||
}
|
||||
|
||||
/// <devdoc>
|
||||
/// <para>Represents the entry at the specified index of the <see cref='System.CodeDom.CodeAttributeArgument'/>.</para>
|
||||
/// </devdoc>
|
||||
public CodeAttributeArgument this[int index] {
|
||||
get {
|
||||
return ((CodeAttributeArgument)(List[index]));
|
||||
}
|
||||
set {
|
||||
List[index] = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <devdoc>
|
||||
/// <para>Adds a <see cref='System.CodeDom.CodeAttributeArgument'/> with the specified value to the
|
||||
/// <see cref='System.CodeDom.CodeAttributeArgumentCollection'/> .</para>
|
||||
/// </devdoc>
|
||||
public int Add(CodeAttributeArgument value) {
|
||||
return List.Add(value);
|
||||
}
|
||||
|
||||
/// <devdoc>
|
||||
/// <para>Copies the elements of an array to the end of the <see cref='System.CodeDom.CodeAttributeArgumentCollection'/>.</para>
|
||||
/// </devdoc>
|
||||
public void AddRange(CodeAttributeArgument[] value) {
|
||||
if (value == null) {
|
||||
throw new ArgumentNullException("value");
|
||||
}
|
||||
for (int i = 0; ((i) < (value.Length)); i = ((i) + (1))) {
|
||||
this.Add(value[i]);
|
||||
}
|
||||
}
|
||||
|
||||
/// <devdoc>
|
||||
/// <para>
|
||||
/// Adds the contents of another <see cref='System.CodeDom.CodeAttributeArgumentCollection'/> to the end of the collection.
|
||||
/// </para>
|
||||
/// </devdoc>
|
||||
public void AddRange(CodeAttributeArgumentCollection value) {
|
||||
if (value == null) {
|
||||
throw new ArgumentNullException("value");
|
||||
}
|
||||
int currentCount = value.Count;
|
||||
for (int i = 0; i < currentCount; i = ((i) + (1))) {
|
||||
this.Add(value[i]);
|
||||
}
|
||||
}
|
||||
|
||||
/// <devdoc>
|
||||
/// <para>Gets a value indicating whether the
|
||||
/// <see cref='System.CodeDom.CodeAttributeArgumentCollection'/> contains the specified <see cref='System.CodeDom.CodeAttributeArgument'/>.</para>
|
||||
/// </devdoc>
|
||||
public bool Contains(CodeAttributeArgument value) {
|
||||
return List.Contains(value);
|
||||
}
|
||||
|
||||
/// <devdoc>
|
||||
/// <para>Copies the <see cref='System.CodeDom.CodeAttributeArgumentCollection'/> values to a one-dimensional <see cref='System.Array'/> instance at the
|
||||
/// specified index.</para>
|
||||
/// </devdoc>
|
||||
public void CopyTo(CodeAttributeArgument[] array, int index) {
|
||||
List.CopyTo(array, index);
|
||||
}
|
||||
|
||||
/// <devdoc>
|
||||
/// <para>Returns the index of a <see cref='System.CodeDom.CodeAttributeArgument'/> in
|
||||
/// the <see cref='System.CodeDom.CodeAttributeArgumentCollection'/> .</para>
|
||||
/// </devdoc>
|
||||
public int IndexOf(CodeAttributeArgument value) {
|
||||
return List.IndexOf(value);
|
||||
}
|
||||
|
||||
/// <devdoc>
|
||||
/// <para>Inserts a <see cref='System.CodeDom.CodeAttributeArgument'/> into the <see cref='System.CodeDom.CodeAttributeArgumentCollection'/> at the specified index.</para>
|
||||
/// </devdoc>
|
||||
public void Insert(int index, CodeAttributeArgument value) {
|
||||
List.Insert(index, value);
|
||||
}
|
||||
|
||||
/// <devdoc>
|
||||
/// <para> Removes a specific <see cref='System.CodeDom.CodeAttributeArgument'/> from the
|
||||
/// <see cref='System.CodeDom.CodeAttributeArgumentCollection'/> .</para>
|
||||
/// </devdoc>
|
||||
public void Remove(CodeAttributeArgument value) {
|
||||
List.Remove(value);
|
||||
}
|
||||
}
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user