diff --git a/scripts/Makefile b/scripts/Makefile index 2cb84bd52d..f0eed5d4ab 100644 --- a/scripts/Makefile +++ b/scripts/Makefile @@ -88,8 +88,9 @@ System.Reflection.Metadata.dll: System.Reflection.Metadata.*/lib/portable-net45+ System.Collections.Immutable.dll: System.Collections.Immutable.*/lib/portable-net45+win8+wp8+wpa81/System.Collections.Immutable.dll cp -f $< $@ -dotnetlibs/Microsoft.Management.Infrastructure.Native.dll: $(MONAD_EXT)/PS/windows_libs_modil/Microsoft.Management.Infrastructure.Native.dll - cp -f $^ $@ +# this one is built from stubs +dotnetlibs/Microsoft.Management.Infrastructure.Native.dll: ../src/stubs/Microsoft.Management.Infrastructure.Native-stub.cs ../src/stubs/Microsoft.Management.Infrastructure.Native-stub-assembly-info.cs + $(CSC) -out:$@ $(MCSOPTS_LIB) $(PRODUCT_BASE_REFS) $^ MPATH=/usr/lib/mono/4.5/Facades diff --git a/src/stubs/Microsoft.Management.Infrastructure.Native-stub-assembly-info.cs b/src/stubs/Microsoft.Management.Infrastructure.Native-stub-assembly-info.cs new file mode 100644 index 0000000000..4b088e7577 --- /dev/null +++ b/src/stubs/Microsoft.Management.Infrastructure.Native-stub-assembly-info.cs @@ -0,0 +1,3 @@ +using System.Runtime.CompilerServices; +[assembly:InternalsVisibleTo("Microsoft.Management.Infrastructure")] + diff --git a/src/stubs/Microsoft.Management.Infrastructure.Native-stub.cs b/src/stubs/Microsoft.Management.Infrastructure.Native-stub.cs index 9dd3f656a4..b59cc14546 100644 --- a/src/stubs/Microsoft.Management.Infrastructure.Native-stub.cs +++ b/src/stubs/Microsoft.Management.Infrastructure.Native-stub.cs @@ -1,36 +1,114 @@ +using Microsoft.Win32.SafeHandles; +using System; +using System.Runtime.InteropServices; +using System.Diagnostics.CodeAnalysis; +using System.Security; + +namespace Microsoft.Win32.SafeHandles +{ + internal class SafeHandleZeroOrMinusOneIsInvalid + { + } +} + namespace Microsoft.Management.Infrastructure.Native { + internal class ApplicationHandle : SafeHandleZeroOrMinusOneIsInvalid + { + internal void AssertValidInternalState() + { + throw new NotImplementedException(); + } + public void Dispose() + { + throw new NotImplementedException(); + } + internal delegate void OnHandleReleasedDelegate(); + internal MiResult ReleaseHandleAsynchronously(OnHandleReleasedDelegate completionCallback) + { + throw new NotImplementedException(); + } + internal MiResult ReleaseHandleSynchronously() + { + throw new NotImplementedException(); + } + } + internal class ApplicationMethods { // Fields - private static ApplicationHandle applicationHandle; - private static InstanceHandle applicationInitializationError; - private static MiResult applicationInitializationResult; + //private static ApplicationHandle applicationHandle; + //private static InstanceHandle applicationInitializationError; + //private static MiResult applicationInitializationResult; internal static string protocol_DCOM; internal static string protocol_WSMan; // Methods - static ApplicationMethods(); - private ApplicationMethods(); - internal static MiResult GetCimErrorFromMiResult(MiResult errorCode, string errorMessage, out InstanceHandle cimError); - internal static MiResult Initialize(out InstanceHandle errorDetails, out ApplicationHandle applicationHandle); - private static MiResult InitializeCore(out InstanceHandle errorDetails, out ApplicationHandle applicationHandle); - internal static MiResult NewDeserializer(ApplicationHandle applicationHandle, string format, uint flags, out DeserializerHandle deserializerHandle); - internal static MiResult NewDestinationOptions(ApplicationHandle applicationHandle, out DestinationOptionsHandle destinationOptionsHandle); - internal static MiResult NewInstance(ApplicationHandle applicationHandle, string className, ClassHandle classHandle, out InstanceHandle newInstance); - internal static MiResult NewOperationOptions(ApplicationHandle applicationHandle, [MarshalAs(UnmanagedType.U1)] bool mustUnderstand, out OperationOptionsHandle operationOptionsHandle); - internal static MiResult NewSerializer(ApplicationHandle applicationHandle, string format, uint flags, out SerializerHandle serializerHandle); - internal static MiResult NewSession(ApplicationHandle applicationHandle, string protocol, string destination, DestinationOptionsHandle destinationOptionsHandle, out InstanceHandle extendedError, out SessionHandle sessionHandle); - internal static MiResult NewSubscriptionDeliveryOptions(ApplicationHandle applicationHandle, MiSubscriptionDeliveryType deliveryType, out SubscriptionDeliveryOptionsHandle subscriptionDeliveryOptionsHandle); + static ApplicationMethods() + { + throw new NotImplementedException(); + } + private ApplicationMethods() + { + throw new NotImplementedException(); + } + internal static MiResult GetCimErrorFromMiResult(MiResult errorCode, string errorMessage, out InstanceHandle cimError) + { + throw new NotImplementedException(); + } + internal static MiResult Initialize(out InstanceHandle errorDetails, out ApplicationHandle applicationHandle) + { + throw new NotImplementedException(); + } + private static MiResult InitializeCore(out InstanceHandle errorDetails, out ApplicationHandle applicationHandle) + { + throw new NotImplementedException(); + } + internal static MiResult NewDeserializer(ApplicationHandle applicationHandle, string format, uint flags, out DeserializerHandle deserializerHandle) + { + throw new NotImplementedException(); + } + internal static MiResult NewDestinationOptions(ApplicationHandle applicationHandle, out DestinationOptionsHandle destinationOptionsHandle) + { + throw new NotImplementedException(); + } + internal static MiResult NewInstance(ApplicationHandle applicationHandle, string className, ClassHandle classHandle, out InstanceHandle newInstance) + { + throw new NotImplementedException(); + } + internal static MiResult NewOperationOptions(ApplicationHandle applicationHandle, [MarshalAs(UnmanagedType.U1)] bool mustUnderstand, out OperationOptionsHandle operationOptionsHandle) + { + throw new NotImplementedException(); + } + internal static MiResult NewSerializer(ApplicationHandle applicationHandle, string format, uint flags, out SerializerHandle serializerHandle) + { + throw new NotImplementedException(); + } + internal static MiResult NewSession(ApplicationHandle applicationHandle, string protocol, string destination, DestinationOptionsHandle destinationOptionsHandle, out InstanceHandle extendedError, out SessionHandle sessionHandle) + { + throw new NotImplementedException(); + } + internal static MiResult NewSubscriptionDeliveryOptions(ApplicationHandle applicationHandle, MiSubscriptionDeliveryType deliveryType, out SubscriptionDeliveryOptionsHandle subscriptionDeliveryOptionsHandle) + { + throw new NotImplementedException(); + } } - internal class ApplicationMethodsInternal { // Methods - private ApplicationMethodsInternal(); - internal static MiResult NewDeserializerMOF(ApplicationHandle applicationHandle, string format, uint flags, out DeserializerHandle deserializerHandle); - internal static MiResult NewSerializerMOF(ApplicationHandle applicationHandle, string format, uint flags, out SerializerHandle serializerHandle); + private ApplicationMethodsInternal() + { + throw new NotImplementedException(); + } + internal static MiResult NewDeserializerMOF(ApplicationHandle applicationHandle, string format, uint flags, out DeserializerHandle deserializerHandle) + { + throw new NotImplementedException(); + } + internal static MiResult NewSerializerMOF(ApplicationHandle applicationHandle, string format, uint flags, out SerializerHandle serializerHandle) + { + throw new NotImplementedException(); + } } internal class AuthType @@ -49,93 +127,279 @@ namespace Microsoft.Management.Infrastructure.Native internal static string AuthTypeNTLM; // Methods - static AuthType(); - private AuthType(); + static AuthType() + { + throw new NotImplementedException(); + } + private AuthType() + { + throw new NotImplementedException(); + } + } + + internal class ClassHandle : SafeHandleZeroOrMinusOneIsInvalid + { + internal void AssertValidInternalState() + { + throw new NotImplementedException(); + } + public void Dispose() + { + throw new NotImplementedException(); + } + internal delegate void OnHandleReleasedDelegate(); + internal MiResult ReleaseHandleAsynchronously(OnHandleReleasedDelegate completionCallback) + { + throw new NotImplementedException(); + } + internal MiResult ReleaseHandleSynchronously() + { + throw new NotImplementedException(); + } + + // should be part of SafeHandleZeroOrMinusOneIsInvalid + public bool IsInvalid { get; } } internal class ClassMethods { // Methods - private ClassMethods(); - internal static MiResult Clone(ClassHandle ClassHandleToClone, out ClassHandle clonedClassHandle); - internal static int GetClassHashCode(ClassHandle handle); - internal static MiResult GetClassName(ClassHandle handle, out string className); - internal static MiResult GetClassQualifier_Index(ClassHandle handle, string name, out int index); - internal static MiResult GetElement_GetIndex(ClassHandle handle, string name, out int index); - internal static MiResult GetElementAt_GetFlags(ClassHandle handle, int index, out MiFlags flags); - internal static MiResult GetElementAt_GetName(ClassHandle handle, int index, out string name); - internal static MiResult GetElementAt_GetReferenceClass(ClassHandle handle, int index, out string referenceClass); - internal static MiResult GetElementAt_GetType(ClassHandle handle, int index, out MiType type); - internal static MiResult GetElementAt_GetValue(ClassHandle handle, int index, out object value); - internal static MiResult GetElementCount(ClassHandle handle, out int count); - internal static MiResult GetMethod_GetIndex(ClassHandle handle, string name, out int index); - internal static MiResult GetMethodAt_GetName(ClassHandle handle, int methodIndex, int parameterIndex, out string name); - internal static MiResult GetMethodAt_GetReferenceClass(ClassHandle handle, int methodIndex, int parameterIndex, out string referenceClass); - internal static MiResult GetMethodAt_GetType(ClassHandle handle, int methodIndex, int parameterIndex, out MiType type); - internal static MiResult GetMethodCount(ClassHandle handle, out int methodCount); - internal static MiResult GetMethodElement_GetIndex(ClassHandle handle, int methodIndex, string name, out int index); - internal static MiResult GetMethodElementAt_GetName(ClassHandle handle, int index, out string name); - internal static MiResult GetMethodElementAt_GetType(ClassHandle handle, int index, out MiType type); - internal static MiResult GetMethodGetQualifierElement_GetIndex(ClassHandle handle, int methodIndex, int parameterIndex, string name, out int index); - internal static MiResult GetMethodParameterGetQualifierElementAt_GetFlags(ClassHandle handle, int methodIndex, int parameterName, int index, out MiFlags flags); - internal static MiResult GetMethodParameterGetQualifierElementAt_GetName(ClassHandle handle, int methodIndex, int parameterName, int index, out string name); - internal static MiResult GetMethodParameterGetQualifierElementAt_GetType(ClassHandle handle, int methodIndex, int parameterName, int index, out MiType type); - internal static MiResult GetMethodParameterGetQualifierElementAt_GetValue(ClassHandle handle, int methodIndex, int parameterName, int index, out object value); - internal static MiResult GetMethodParametersCount(ClassHandle handle, int index, out int parameterCount); - internal static MiResult GetMethodParametersGetQualifiersCount(ClassHandle handle, int index, int parameterIndex, out int parameterCount); - internal static MiResult GetMethodQualifierCount(ClassHandle handle, int methodIndex, out int parameterCount); - internal static MiResult GetMethodQualifierElement_GetIndex(ClassHandle handle, int methodIndex, string name, out int index); - internal static MiResult GetMethodQualifierElementAt_GetFlags(ClassHandle handle, int methodIndex, int qualifierIndex, out MiFlags flags); - internal static MiResult GetMethodQualifierElementAt_GetName(ClassHandle handle, int methodIndex, int qualifierIndex, out string name); - internal static MiResult GetMethodQualifierElementAt_GetType(ClassHandle handle, int methodIndex, int qualifierIndex, out MiType type); - internal static MiResult GetMethodQualifierElementAt_GetValue(ClassHandle handle, int methodIndex, int qualifierIndex, out object value); - internal static MiResult GetNamespace(ClassHandle handle, out string nameSpace); - internal static MiResult GetParentClass(ClassHandle handle, out ClassHandle superClass); - internal static MiResult GetParentClassName(ClassHandle handle, out string className); - internal static MiResult GetPropertyQualifier_Count(ClassHandle handle, string name, out int count); - internal static MiResult GetPropertyQualifier_Index(ClassHandle handle, string propertyName, string name, out int index); - internal static MiResult GetPropertyQualifierElementAt_GetFlags(ClassHandle handle, int index, string propertyName, out MiFlags flags); - internal static MiResult GetPropertyQualifierElementAt_GetName(ClassHandle handle, int index, string propertyName, out string name); - internal static MiResult GetPropertyQualifierElementAt_GetType(ClassHandle handle, int index, string propertyName, out MiType type); - internal static MiResult GetPropertyQualifierElementAt_GetValue(ClassHandle handle, int index, string propertyName, out object value); - internal static MiResult GetQualifier_Count(ClassHandle handle, out int qualifierCount); - internal static MiResult GetQualifierElementAt_GetFlags(ClassHandle handle, int index, out MiFlags flags); - internal static MiResult GetQualifierElementAt_GetName(ClassHandle handle, int index, out string name); - internal static MiResult GetQualifierElementAt_GetType(ClassHandle handle, int index, out MiType type); - internal static MiResult GetQualifierElementAt_GetValue(ClassHandle handle, int index, out object value); - internal static MiResult GetServerName(ClassHandle handle, out string serverName); + private ClassMethods() + { + throw new NotImplementedException(); + } + internal static MiResult Clone(ClassHandle ClassHandleToClone, out ClassHandle clonedClassHandle) + { + throw new NotImplementedException(); + } + internal static int GetClassHashCode(ClassHandle handle) + { + throw new NotImplementedException(); + } + internal static MiResult GetClassName(ClassHandle handle, out string className) + { + throw new NotImplementedException(); + } + internal static MiResult GetClassQualifier_Index(ClassHandle handle, string name, out int index) + { + throw new NotImplementedException(); + } + internal static MiResult GetElement_GetIndex(ClassHandle handle, string name, out int index) + { + throw new NotImplementedException(); + } + internal static MiResult GetElementAt_GetFlags(ClassHandle handle, int index, out MiFlags flags) + { + throw new NotImplementedException(); + } + internal static MiResult GetElementAt_GetName(ClassHandle handle, int index, out string name) + { + throw new NotImplementedException(); + } + internal static MiResult GetElementAt_GetReferenceClass(ClassHandle handle, int index, out string referenceClass) + { + throw new NotImplementedException(); + } + internal static MiResult GetElementAt_GetType(ClassHandle handle, int index, out MiType type) + { + throw new NotImplementedException(); + } + internal static MiResult GetElementAt_GetValue(ClassHandle handle, int index, out object value) + { + throw new NotImplementedException(); + } + internal static MiResult GetElementCount(ClassHandle handle, out int count) + { + throw new NotImplementedException(); + } + internal static MiResult GetMethod_GetIndex(ClassHandle handle, string name, out int index) + { + throw new NotImplementedException(); + } + internal static MiResult GetMethodAt_GetName(ClassHandle handle, int methodIndex, int parameterIndex, out string name) + { + throw new NotImplementedException(); + } + internal static MiResult GetMethodAt_GetReferenceClass(ClassHandle handle, int methodIndex, int parameterIndex, out string referenceClass) + { + throw new NotImplementedException(); + } + internal static MiResult GetMethodAt_GetType(ClassHandle handle, int methodIndex, int parameterIndex, out MiType type) + { + throw new NotImplementedException(); + } + internal static MiResult GetMethodCount(ClassHandle handle, out int methodCount) + { + throw new NotImplementedException(); + } + internal static MiResult GetMethodElement_GetIndex(ClassHandle handle, int methodIndex, string name, out int index) + { + throw new NotImplementedException(); + } + internal static MiResult GetMethodElementAt_GetName(ClassHandle handle, int index, out string name) + { + throw new NotImplementedException(); + } + internal static MiResult GetMethodElementAt_GetType(ClassHandle handle, int index, out MiType type) + { + throw new NotImplementedException(); + } + internal static MiResult GetMethodGetQualifierElement_GetIndex(ClassHandle handle, int methodIndex, int parameterIndex, string name, out int index) + { + throw new NotImplementedException(); + } + internal static MiResult GetMethodParameterGetQualifierElementAt_GetFlags(ClassHandle handle, int methodIndex, int parameterName, int index, out MiFlags flags) + { + throw new NotImplementedException(); + } + internal static MiResult GetMethodParameterGetQualifierElementAt_GetName(ClassHandle handle, int methodIndex, int parameterName, int index, out string name) + { + throw new NotImplementedException(); + } + internal static MiResult GetMethodParameterGetQualifierElementAt_GetType(ClassHandle handle, int methodIndex, int parameterName, int index, out MiType type) + { + throw new NotImplementedException(); + } + internal static MiResult GetMethodParameterGetQualifierElementAt_GetValue(ClassHandle handle, int methodIndex, int parameterName, int index, out object value) + { + throw new NotImplementedException(); + } + internal static MiResult GetMethodParametersCount(ClassHandle handle, int index, out int parameterCount) + { + throw new NotImplementedException(); + } + internal static MiResult GetMethodParametersGetQualifiersCount(ClassHandle handle, int index, int parameterIndex, out int parameterCount) + { + throw new NotImplementedException(); + } + internal static MiResult GetMethodQualifierCount(ClassHandle handle, int methodIndex, out int parameterCount) + { + throw new NotImplementedException(); + } + internal static MiResult GetMethodQualifierElement_GetIndex(ClassHandle handle, int methodIndex, string name, out int index) + { + throw new NotImplementedException(); + } + internal static MiResult GetMethodQualifierElementAt_GetFlags(ClassHandle handle, int methodIndex, int qualifierIndex, out MiFlags flags) + { + throw new NotImplementedException(); + } + internal static MiResult GetMethodQualifierElementAt_GetName(ClassHandle handle, int methodIndex, int qualifierIndex, out string name) + { + throw new NotImplementedException(); + } + internal static MiResult GetMethodQualifierElementAt_GetType(ClassHandle handle, int methodIndex, int qualifierIndex, out MiType type) + { + throw new NotImplementedException(); + } + internal static MiResult GetMethodQualifierElementAt_GetValue(ClassHandle handle, int methodIndex, int qualifierIndex, out object value) + { + throw new NotImplementedException(); + } + internal static MiResult GetNamespace(ClassHandle handle, out string nameSpace) + { + throw new NotImplementedException(); + } + internal static MiResult GetParentClass(ClassHandle handle, out ClassHandle superClass) + { + throw new NotImplementedException(); + } + internal static MiResult GetParentClassName(ClassHandle handle, out string className) + { + throw new NotImplementedException(); + } + internal static MiResult GetPropertyQualifier_Count(ClassHandle handle, string name, out int count) + { + throw new NotImplementedException(); + } + internal static MiResult GetPropertyQualifier_Index(ClassHandle handle, string propertyName, string name, out int index) + { + throw new NotImplementedException(); + } + internal static MiResult GetPropertyQualifierElementAt_GetFlags(ClassHandle handle, int index, string propertyName, out MiFlags flags) + { + throw new NotImplementedException(); + } + internal static MiResult GetPropertyQualifierElementAt_GetName(ClassHandle handle, int index, string propertyName, out string name) + { + throw new NotImplementedException(); + } + internal static MiResult GetPropertyQualifierElementAt_GetType(ClassHandle handle, int index, string propertyName, out MiType type) + { + throw new NotImplementedException(); + } + internal static MiResult GetPropertyQualifierElementAt_GetValue(ClassHandle handle, int index, string propertyName, out object value) + { + throw new NotImplementedException(); + } + internal static MiResult GetQualifier_Count(ClassHandle handle, out int qualifierCount) + { + throw new NotImplementedException(); + } + internal static MiResult GetQualifierElementAt_GetFlags(ClassHandle handle, int index, out MiFlags flags) + { + throw new NotImplementedException(); + } + internal static MiResult GetQualifierElementAt_GetName(ClassHandle handle, int index, out string name) + { + throw new NotImplementedException(); + } + internal static MiResult GetQualifierElementAt_GetType(ClassHandle handle, int index, out MiType type) + { + throw new NotImplementedException(); + } + internal static MiResult GetQualifierElementAt_GetValue(ClassHandle handle, int index, out object value) + { + throw new NotImplementedException(); + } + internal static MiResult GetServerName(ClassHandle handle, out string serverName) + { + throw new NotImplementedException(); + } } internal class DangerousHandleAccessor : IDisposable { // Fields - private bool needToCallDangerousRelease; - private SafeHandle safeHandle; + //private bool needToCallDangerousRelease; + //private SafeHandle safeHandle; // Methods - internal DangerousHandleAccessor(SafeHandle safeHandle); - private void ~DangerousHandleAccessor(); + internal DangerousHandleAccessor(SafeHandle safeHandle) + { + throw new NotImplementedException(); + } [SuppressMessage("Microsoft.Reliability", "CA2001:AvoidCallingProblematicMethods", MessageId = "System.Runtime.InteropServices.SafeHandle.DangerousGetHandle", Justification = "We are calling DangerousAddRef/Release as prescribed in the docs + have to do this to call inline methods")] - internal IntPtr DangerousGetHandle(); - public sealed override void Dispose(); - protected virtual void Dispose([MarshalAs(UnmanagedType.U1)] bool A_0); + internal IntPtr DangerousGetHandle() + { + throw new NotImplementedException(); + } + //public sealed override void Dispose() + public void Dispose() + { + throw new NotImplementedException(); + } + //protected virtual void Dispose([MarshalAs(UnmanagedType.U1)] bool A_0) } internal class DeserializerCallbacks { // Fields - private ClassObjectNeededCallbackDelegate ClassObjectNeededCallback; - private GetIncludedFileBufferCallbackDelegate GetIncludedFileBufferCallback; - private object ManagedDeserializerContext; + //private ClassObjectNeededCallbackDelegate ClassObjectNeededCallback; + //private GetIncludedFileBufferCallbackDelegate GetIncludedFileBufferCallback; + //private object ManagedDeserializerContext; - // Methods - internal DeserializerCallbacks(); - internal static unsafe _MI_Result ClassObjectNeededAppDomainProxy(void* context, ushort modopt(IsConst)* serverName, ushort modopt(IsConst)* namespaceName, ushort modopt(IsConst)* className, _MI_Class** requestedClassObject); - internal static unsafe _MI_Result GetIncludedFileBufferAppDomainProxy(void* context, ushort modopt(IsConst)* fileName, byte** fileBuffer, uint* bufferLength); - internal static unsafe void ReleaseDeserializerCallbacksProxy(DeserializerCallbacksProxy* pCallbacksProxy); - [return: MarshalAs(UnmanagedType.U1)] - internal unsafe bool SetMiDeserializerCallbacks(_MI_DeserializerCallbacks* pmiDeserializerCallbacks); - private static unsafe void StoreCallbackDelegate(DeserializerCallbacksProxy* pCallbacksProxy, Delegate externalCallback, Delegate appDomainProxyCallback, DeserializerCallbackId callbackId); + // Methods + internal DeserializerCallbacks() + { + throw new NotImplementedException(); + } + //internal static unsafe _MI_Result ClassObjectNeededAppDomainProxy(void* context, ushort modopt(IsConst)* serverName, ushort modopt(IsConst)* namespaceName, ushort modopt(IsConst)* className, _MI_Class** requestedClassObject) + //internal static unsafe _MI_Result GetIncludedFileBufferAppDomainProxy(void* context, ushort modopt(IsConst)* fileName, byte** fileBuffer, uint* bufferLength) + //internal static unsafe void ReleaseDeserializerCallbacksProxy(DeserializerCallbacksProxy* pCallbacksProxy) + //[return: MarshalAs(UnmanagedType.U1)] + //internal unsafe bool SetMiDeserializerCallbacks(_MI_DeserializerCallbacks* pmiDeserializerCallbacks) + //private static unsafe void StoreCallbackDelegate(DeserializerCallbacksProxy* pCallbacksProxy, Delegate externalCallback, Delegate appDomainProxyCallback, DeserializerCallbackId callbackId); // Properties [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "False positive from FxCop - this property is used in nativeOperationCallbacks.cpp")] @@ -146,29 +410,86 @@ namespace Microsoft.Management.Infrastructure.Native internal object ManagedDeserializerContext { get; set; } // Nested Types - internal unsafe delegate _MI_Result ClassObjectNeededAppDomainProxyDelegate(void* context, ushort modopt(IsConst)* serverName, ushort modopt(IsConst)* namespaceName, ushort modopt(IsConst)* className, _MI_Class** requestedClassObject); - + //internal unsafe delegate _MI_Result ClassObjectNeededAppDomainProxyDelegate(void* context, ushort modopt(IsConst)* serverName, ushort modopt(IsConst)* namespaceName, ushort modopt(IsConst)* className, _MI_Class** requestedClassObject) internal delegate bool ClassObjectNeededCallbackDelegate(string serverName, string namespaceName, string className, out ClassHandle classHandle); - - internal unsafe delegate _MI_Result GetIncludedFileBufferAppDomainProxyDelegate(void* context, ushort modopt(IsConst)* fileName, byte** fileBuffer, uint* bufferLength); - + //internal unsafe delegate _MI_Result GetIncludedFileBufferAppDomainProxyDelegate(void* context, ushort modopt(IsConst)* fileName, byte** fileBuffer, uint* bufferLength) internal delegate bool GetIncludedFileBufferCallbackDelegate(string fileName, out byte[] fileBuffer); } internal class DeserializerInternalMethods { // Methods - private DeserializerInternalMethods(); - internal static MiResult DeserializeClassArray(DeserializerHandle deserializerHandle, OperationOptionsHandle options, DeserializerCallbacks callback, byte[] serializedBuffer, uint offset, ClassHandle[] classObjects, string serverName, string nameSpace, out ClassHandle[] deserializedClasses, out uint inputBufferUsed, out InstanceHandle cimErrorDetails); - internal static MiResult DeserializeInstanceArray(DeserializerHandle deserializerHandle, OperationOptionsHandle options, DeserializerCallbacks callback, byte[] serializedBuffer, uint offset, ClassHandle[] classObjects, out InstanceHandle[] deserializedInstances, out uint inputBufferUsed, out InstanceHandle cimErrorDetails); + private DeserializerInternalMethods() + { + throw new NotImplementedException(); + } + internal static MiResult DeserializeClassArray(DeserializerHandle deserializerHandle, OperationOptionsHandle options, DeserializerCallbacks callback, byte[] serializedBuffer, uint offset, ClassHandle[] classObjects, string serverName, string nameSpace, out ClassHandle[] deserializedClasses, out uint inputBufferUsed, out InstanceHandle cimErrorDetails) + { + throw new NotImplementedException(); + } + internal static MiResult DeserializeInstanceArray(DeserializerHandle deserializerHandle, OperationOptionsHandle options, DeserializerCallbacks callback, byte[] serializedBuffer, uint offset, ClassHandle[] classObjects, out InstanceHandle[] deserializedInstances, out uint inputBufferUsed, out InstanceHandle cimErrorDetails) + { + throw new NotImplementedException(); + } + } + + internal class DeserializerHandle : SafeHandleZeroOrMinusOneIsInvalid + { + internal void AssertValidInternalState() + { + throw new NotImplementedException(); + } + public void Dispose() + { + throw new NotImplementedException(); + } + internal delegate void OnHandleReleasedDelegate(); + internal MiResult ReleaseHandleAsynchronously(OnHandleReleasedDelegate completionCallback) + { + throw new NotImplementedException(); + } + internal MiResult ReleaseHandleSynchronously() + { + throw new NotImplementedException(); + } } internal class DeserializerMethods { // Methods - private DeserializerMethods(); - internal static MiResult DeserializeClass(DeserializerHandle deserializerHandle, uint flags, byte[] serializedBuffer, uint offset, ClassHandle parentClass, string serverName, string nameSpace, out ClassHandle deserializedClass, out uint inputBufferUsed, out InstanceHandle cimErrorDetails); - internal static MiResult DeserializeInstance(DeserializerHandle deserializerHandle, uint flags, byte[] serializedBuffer, uint offset, ClassHandle[] classObjects, out InstanceHandle deserializedInstance, out uint inputBufferUsed, out InstanceHandle cimErrorDetails); + private DeserializerMethods() + { + throw new NotImplementedException(); + } + internal static MiResult DeserializeClass(DeserializerHandle deserializerHandle, uint flags, byte[] serializedBuffer, uint offset, ClassHandle parentClass, string serverName, string nameSpace, out ClassHandle deserializedClass, out uint inputBufferUsed, out InstanceHandle cimErrorDetails) + { + throw new NotImplementedException(); + } + internal static MiResult DeserializeInstance(DeserializerHandle deserializerHandle, uint flags, byte[] serializedBuffer, uint offset, ClassHandle[] classObjects, out InstanceHandle deserializedInstance, out uint inputBufferUsed, out InstanceHandle cimErrorDetails) + { + throw new NotImplementedException(); + } + } + + internal class DestinationOptionsHandle : SafeHandleZeroOrMinusOneIsInvalid + { + internal void AssertValidInternalState() + { + throw new NotImplementedException(); + } + public void Dispose() + { + throw new NotImplementedException(); + } + internal delegate void OnHandleReleasedDelegate(); + internal MiResult ReleaseHandleAsynchronously(OnHandleReleasedDelegate completionCallback) + { + throw new NotImplementedException(); + } + internal MiResult ReleaseHandleSynchronously() + { + throw new NotImplementedException(); + } } internal class DestinationOptionsMethods @@ -185,45 +506,162 @@ namespace Microsoft.Management.Infrastructure.Native internal static string transport_Https; // Methods - static DestinationOptionsMethods(); - private DestinationOptionsMethods(); - internal static MiResult AddDestinationCredentials(DestinationOptionsHandle destinationOptionsHandle, NativeCimCredentialHandle credentials); - internal static MiResult AddProxyCredentials(DestinationOptionsHandle destinationOptionsHandle, NativeCimCredentialHandle credentials); - internal static MiResult Clone(DestinationOptionsHandle destinationOptionsHandle, out DestinationOptionsHandle newDestinationOptionsHandle); - internal static MiResult GetCertCACheck(DestinationOptionsHandle destinationOptionsHandle, out bool check); - internal static MiResult GetCertCNCheck(DestinationOptionsHandle destinationOptionsHandle, out bool check); - internal static MiResult GetCertRevocationCheck(DestinationOptionsHandle destinationOptionsHandle, out bool check); - internal static MiResult GetDataLocale(DestinationOptionsHandle destinationOptionsHandle, out string locale); - internal static MiResult GetDestinationPort(DestinationOptionsHandle destinationOptionsHandle, out uint port); - internal static MiResult GetEncodePortInSPN(DestinationOptionsHandle destinationOptionsHandle, out bool encodePort); - internal static MiResult GetHttpUrlPrefix(DestinationOptionsHandle destinationOptionsHandle, out string prefix); - internal static MiResult GetImpersonationType(DestinationOptionsHandle destinationOptionsHandle, out MiImpersonationType impersonationType); - internal static MiResult GetMaxEnvelopeSize(DestinationOptionsHandle destinationOptionsHandle, out uint sizeInKB); - internal static MiResult GetPacketEncoding(DestinationOptionsHandle destinationOptionsHandle, out string encoding); - internal static MiResult GetPacketIntegrity(DestinationOptionsHandle destinationOptionsHandle, out bool integrity); - internal static MiResult GetPacketPrivacy(DestinationOptionsHandle destinationOptionsHandle, out bool privacy); - internal static MiResult GetProxyType(DestinationOptionsHandle destinationOptionsHandle, out string proxyType); - internal static MiResult GetTimeout(DestinationOptionsHandle destinationOptionsHandle, out TimeSpan timeout); - internal static MiResult GetTransport(DestinationOptionsHandle destinationOptionsHandle, out string transport); - internal static MiResult GetUILocale(DestinationOptionsHandle destinationOptionsHandle, out string locale); - internal static MiResult SetCertCACheck(DestinationOptionsHandle destinationOptionsHandle, [MarshalAs(UnmanagedType.U1)] bool check); - internal static MiResult SetCertCNCheck(DestinationOptionsHandle destinationOptionsHandle, [MarshalAs(UnmanagedType.U1)] bool check); - internal static MiResult SetCertRevocationCheck(DestinationOptionsHandle destinationOptionsHandle, [MarshalAs(UnmanagedType.U1)] bool check); - internal static MiResult SetCustomOption(DestinationOptionsHandle destinationOptionsHandle, string optionName, string optionValue); - internal static MiResult SetCustomOption(DestinationOptionsHandle destinationOptionsHandle, string optionName, uint optionValue); - internal static MiResult SetDataLocale(DestinationOptionsHandle destinationOptionsHandle, string locale); - internal static MiResult SetDestinationPort(DestinationOptionsHandle destinationOptionsHandle, uint port); - internal static MiResult SetEncodePortInSPN(DestinationOptionsHandle destinationOptionsHandle, [MarshalAs(UnmanagedType.U1)] bool encodePort); - internal static MiResult SetHttpUrlPrefix(DestinationOptionsHandle destinationOptionsHandle, string prefix); - internal static MiResult SetImpersonationType(DestinationOptionsHandle destinationOptionsHandle, MiImpersonationType impersonationType); - internal static MiResult SetMaxEnvelopeSize(DestinationOptionsHandle destinationOptionsHandle, uint sizeInKB); - internal static MiResult SetPacketEncoding(DestinationOptionsHandle destinationOptionsHandle, string encoding); - internal static MiResult SetPacketIntegrity(DestinationOptionsHandle destinationOptionsHandle, [MarshalAs(UnmanagedType.U1)] bool integrity); - internal static MiResult SetPacketPrivacy(DestinationOptionsHandle destinationOptionsHandle, [MarshalAs(UnmanagedType.U1)] bool privacy); - internal static MiResult SetProxyType(DestinationOptionsHandle destinationOptionsHandle, string proxyType); - internal static MiResult SetTimeout(DestinationOptionsHandle destinationOptionsHandle, TimeSpan timeout); - internal static MiResult SetTransport(DestinationOptionsHandle destinationOptionsHandle, string transport); - internal static MiResult SetUILocale(DestinationOptionsHandle destinationOptionsHandle, string locale); + static DestinationOptionsMethods() + { + throw new NotImplementedException(); + } + private DestinationOptionsMethods() + { + throw new NotImplementedException(); + } + internal static MiResult AddDestinationCredentials(DestinationOptionsHandle destinationOptionsHandle, NativeCimCredentialHandle credentials) + { + throw new NotImplementedException(); + } + internal static MiResult AddProxyCredentials(DestinationOptionsHandle destinationOptionsHandle, NativeCimCredentialHandle credentials) + { + throw new NotImplementedException(); + } + internal static MiResult Clone(DestinationOptionsHandle destinationOptionsHandle, out DestinationOptionsHandle newDestinationOptionsHandle) + { + throw new NotImplementedException(); + } + internal static MiResult GetCertCACheck(DestinationOptionsHandle destinationOptionsHandle, out bool check) + { + throw new NotImplementedException(); + } + internal static MiResult GetCertCNCheck(DestinationOptionsHandle destinationOptionsHandle, out bool check) + { + throw new NotImplementedException(); + } + internal static MiResult GetCertRevocationCheck(DestinationOptionsHandle destinationOptionsHandle, out bool check) + { + throw new NotImplementedException(); + } + internal static MiResult GetDataLocale(DestinationOptionsHandle destinationOptionsHandle, out string locale) + { + throw new NotImplementedException(); + } + internal static MiResult GetDestinationPort(DestinationOptionsHandle destinationOptionsHandle, out uint port) + { + throw new NotImplementedException(); + } + internal static MiResult GetEncodePortInSPN(DestinationOptionsHandle destinationOptionsHandle, out bool encodePort) + { + throw new NotImplementedException(); + } + internal static MiResult GetHttpUrlPrefix(DestinationOptionsHandle destinationOptionsHandle, out string prefix) + { + throw new NotImplementedException(); + } + internal static MiResult GetImpersonationType(DestinationOptionsHandle destinationOptionsHandle, out MiImpersonationType impersonationType) + { + throw new NotImplementedException(); + } + internal static MiResult GetMaxEnvelopeSize(DestinationOptionsHandle destinationOptionsHandle, out uint sizeInKB) + { + throw new NotImplementedException(); + } + internal static MiResult GetPacketEncoding(DestinationOptionsHandle destinationOptionsHandle, out string encoding) + { + throw new NotImplementedException(); + } + internal static MiResult GetPacketIntegrity(DestinationOptionsHandle destinationOptionsHandle, out bool integrity) + { + throw new NotImplementedException(); + } + internal static MiResult GetPacketPrivacy(DestinationOptionsHandle destinationOptionsHandle, out bool privacy) + { + throw new NotImplementedException(); + } + internal static MiResult GetProxyType(DestinationOptionsHandle destinationOptionsHandle, out string proxyType) + { + throw new NotImplementedException(); + } + internal static MiResult GetTimeout(DestinationOptionsHandle destinationOptionsHandle, out TimeSpan timeout) + { + throw new NotImplementedException(); + } + internal static MiResult GetTransport(DestinationOptionsHandle destinationOptionsHandle, out string transport) + { + throw new NotImplementedException(); + } + internal static MiResult GetUILocale(DestinationOptionsHandle destinationOptionsHandle, out string locale) + { + throw new NotImplementedException(); + } + internal static MiResult SetCertCACheck(DestinationOptionsHandle destinationOptionsHandle, [MarshalAs(UnmanagedType.U1)] bool check) + { + throw new NotImplementedException(); + } + internal static MiResult SetCertCNCheck(DestinationOptionsHandle destinationOptionsHandle, [MarshalAs(UnmanagedType.U1)] bool check) + { + throw new NotImplementedException(); + } + internal static MiResult SetCertRevocationCheck(DestinationOptionsHandle destinationOptionsHandle, [MarshalAs(UnmanagedType.U1)] bool check) + { + throw new NotImplementedException(); + } + internal static MiResult SetCustomOption(DestinationOptionsHandle destinationOptionsHandle, string optionName, string optionValue) + { + throw new NotImplementedException(); + } + internal static MiResult SetCustomOption(DestinationOptionsHandle destinationOptionsHandle, string optionName, uint optionValue) + { + throw new NotImplementedException(); + } + internal static MiResult SetDataLocale(DestinationOptionsHandle destinationOptionsHandle, string locale) + { + throw new NotImplementedException(); + } + internal static MiResult SetDestinationPort(DestinationOptionsHandle destinationOptionsHandle, uint port) + { + throw new NotImplementedException(); + } + internal static MiResult SetEncodePortInSPN(DestinationOptionsHandle destinationOptionsHandle, [MarshalAs(UnmanagedType.U1)] bool encodePort) + { + throw new NotImplementedException(); + } + internal static MiResult SetHttpUrlPrefix(DestinationOptionsHandle destinationOptionsHandle, string prefix) + { + throw new NotImplementedException(); + } + internal static MiResult SetImpersonationType(DestinationOptionsHandle destinationOptionsHandle, MiImpersonationType impersonationType) + { + throw new NotImplementedException(); + } + internal static MiResult SetMaxEnvelopeSize(DestinationOptionsHandle destinationOptionsHandle, uint sizeInKB) + { + throw new NotImplementedException(); + } + internal static MiResult SetPacketEncoding(DestinationOptionsHandle destinationOptionsHandle, string encoding) + { + throw new NotImplementedException(); + } + internal static MiResult SetPacketIntegrity(DestinationOptionsHandle destinationOptionsHandle, [MarshalAs(UnmanagedType.U1)] bool integrity) + { + throw new NotImplementedException(); + } + internal static MiResult SetPacketPrivacy(DestinationOptionsHandle destinationOptionsHandle, [MarshalAs(UnmanagedType.U1)] bool privacy) + { + throw new NotImplementedException(); + } + internal static MiResult SetProxyType(DestinationOptionsHandle destinationOptionsHandle, string proxyType) + { + throw new NotImplementedException(); + } + internal static MiResult SetTimeout(DestinationOptionsHandle destinationOptionsHandle, TimeSpan timeout) + { + throw new NotImplementedException(); + } + internal static MiResult SetTransport(DestinationOptionsHandle destinationOptionsHandle, string transport) + { + throw new NotImplementedException(); + } + internal static MiResult SetUILocale(DestinationOptionsHandle destinationOptionsHandle, string locale) + { + throw new NotImplementedException(); + } // Nested Types internal enum MiImpersonationType @@ -240,174 +678,297 @@ namespace Microsoft.Management.Infrastructure.Native { // Fields internal OperationCallbackProcessingContext callbackProcessingContext; - private OperationCallbacks.InternalErrorCallbackDelegate internalErrorCallback; - internal unsafe MI_OperationWrapper* pmiOperationWrapper; + //private OperationCallbacks.InternalErrorCallbackDelegate internalErrorCallback; + //internal unsafe MI_OperationWrapper* pmiOperationWrapper; // Methods - protected unsafe ExceptionSafeCallbackBase(void* callbackContext); + //protected unsafe ExceptionSafeCallbackBase(void* callbackContext); protected abstract void InvokeUserCallback(); - internal void InvokeUserCallbackAndCatchInternalErrors(); - [return: MarshalAs(UnmanagedType.U1)] - private bool IsInternalException(Exception e); - private void ReportInternalError(Exception exception); + internal void InvokeUserCallbackAndCatchInternalErrors() + { + throw new NotImplementedException(); + } + //[return: MarshalAs(UnmanagedType.U1)] + //private bool IsInternalException(Exception e); + //private void ReportInternalError(Exception exception); } internal class ExceptionSafeClassCallback : ExceptionSafeCallbackBase { // Fields - private unsafe ushort modopt(IsConst)* errorString; - private byte moreResults; - private unsafe _MI_Class modopt(IsConst)* pmiClass; - private unsafe _MI_Instance modopt(IsConst)* pmiErrorDetails; - private unsafe _MI_Operation* pmiOperation; - private _MI_Result modopt(CallConvCdecl) *(_MI_Operation*) resultAcknowledgement; - private _MI_Result resultCode; + //private unsafe ushort modopt(IsConst)* errorString; + //private byte moreResults; + //private unsafe _MI_Class modopt(IsConst)* pmiClass; + //private unsafe _MI_Instance modopt(IsConst)* pmiErrorDetails; + //private unsafe _MI_Operation* pmiOperation; + //private _MI_Result modopt(CallConvCdecl) *(_MI_Operation*) resultAcknowledgement; + //private _MI_Result resultCode; // Methods - internal unsafe ExceptionSafeClassCallback(_MI_Operation* pmiOperation, void* callbackContext, _MI_Class modopt(IsConst)* pmiClass, byte moreResults, _MI_Result resultCode, ushort modopt(IsConst)* errorString, _MI_Instance modopt(IsConst)* pmiErrorDetails, _MI_Result modopt(CallConvCdecl) *(_MI_Operation*) resultAcknowledgement); - protected override void InvokeUserCallback(); + //internal unsafe ExceptionSafeClassCallback(_MI_Operation* pmiOperation, void* callbackContext, _MI_Class modopt(IsConst)* pmiClass, byte moreResults, _MI_Result resultCode, ushort modopt(IsConst)* errorString, _MI_Instance modopt(IsConst)* pmiErrorDetails, _MI_Result modopt(CallConvCdecl) *(_MI_Operation*) resultAcknowledgement); + protected override void InvokeUserCallback() + { + throw new NotImplementedException(); + } } internal class ExceptionSafeIndicationCallback : ExceptionSafeCallbackBase { // Fields - private unsafe ushort modopt(IsConst)* bookmark; - private unsafe ushort modopt(IsConst)* errorString; - private unsafe ushort modopt(IsConst)* machineID; - private byte moreResults; - private unsafe _MI_Instance modopt(IsConst)* pmiErrorDetails; - private unsafe _MI_Instance modopt(IsConst)* pmiInstance; - private unsafe _MI_Operation* pmiOperation; - private _MI_Result modopt(CallConvCdecl) *(_MI_Operation*) resultAcknowledgement; - private _MI_Result resultCode; + //private unsafe ushort modopt(IsConst)* bookmark; + //private unsafe ushort modopt(IsConst)* errorString; + //private unsafe ushort modopt(IsConst)* machineID; + //private byte moreResults; + //private unsafe _MI_Instance modopt(IsConst)* pmiErrorDetails; + //private unsafe _MI_Instance modopt(IsConst)* pmiInstance; + //private unsafe _MI_Operation* pmiOperation; + //private _MI_Result modopt(CallConvCdecl) *(_MI_Operation*) resultAcknowledgement; + //private _MI_Result resultCode; // Methods - internal unsafe ExceptionSafeIndicationCallback(_MI_Operation* pmiOperation, void* callbackContext, _MI_Instance modopt(IsConst)* pmiInstance, ushort modopt(IsConst)* bookmark, ushort modopt(IsConst)* machineID, byte moreResults, _MI_Result resultCode, ushort modopt(IsConst)* errorString, _MI_Instance modopt(IsConst)* pmiErrorDetails, _MI_Result modopt(CallConvCdecl) *(_MI_Operation*) resultAcknowledgement); - protected override void InvokeUserCallback(); + //internal unsafe ExceptionSafeIndicationCallback(_MI_Operation* pmiOperation, void* callbackContext, _MI_Instance modopt(IsConst)* pmiInstance, ushort modopt(IsConst)* bookmark, ushort modopt(IsConst)* machineID, byte moreResults, _MI_Result resultCode, ushort modopt(IsConst)* errorString, _MI_Instance modopt(IsConst)* pmiErrorDetails, _MI_Result modopt(CallConvCdecl) *(_MI_Operation*) resultAcknowledgement); + protected override void InvokeUserCallback() + { + throw new NotImplementedException(); + } } internal class ExceptionSafeInstanceResultCallback : ExceptionSafeCallbackBase { // Fields - private unsafe ushort modopt(IsConst)* errorString; - private byte moreResults; - private unsafe _MI_Instance modopt(IsConst)* pmiErrorDetails; - private unsafe _MI_Instance modopt(IsConst)* pmiInstance; - private unsafe _MI_Operation* pmiOperation; - private _MI_Result modopt(CallConvCdecl) *(_MI_Operation*) resultAcknowledgement; - private _MI_Result resultCode; + //private unsafe ushort modopt(IsConst)* errorString; + //private byte moreResults; + //private unsafe _MI_Instance modopt(IsConst)* pmiErrorDetails; + //private unsafe _MI_Instance modopt(IsConst)* pmiInstance; + //private unsafe _MI_Operation* pmiOperation; + //private _MI_Result modopt(CallConvCdecl) *(_MI_Operation*) resultAcknowledgement; + //private _MI_Result resultCode; // Methods - internal unsafe ExceptionSafeInstanceResultCallback(_MI_Operation* pmiOperation, void* callbackContext, _MI_Instance modopt(IsConst)* pmiInstance, byte moreResults, _MI_Result resultCode, ushort modopt(IsConst)* errorString, _MI_Instance modopt(IsConst)* pmiErrorDetails, _MI_Result modopt(CallConvCdecl) *(_MI_Operation*) resultAcknowledgement); - protected override void InvokeUserCallback(); + //internal unsafe ExceptionSafeInstanceResultCallback(_MI_Operation* pmiOperation, void* callbackContext, _MI_Instance modopt(IsConst)* pmiInstance, byte moreResults, _MI_Result resultCode, ushort modopt(IsConst)* errorString, _MI_Instance modopt(IsConst)* pmiErrorDetails, _MI_Result modopt(CallConvCdecl) *(_MI_Operation*) resultAcknowledgement); + protected override void InvokeUserCallback() + { + throw new NotImplementedException(); + } } internal class ExceptionSafePromptUserCallback : ExceptionSafeCallbackBase { // Fields - private unsafe _MI_Operation* pmiOperation; - private _MI_PromptType promptType; - private _MI_Result modopt(CallConvCdecl) *(_MI_Operation*, _MI_OperationCallback_ResponseType) promptUserResult; - private unsafe ushort modopt(IsConst)* wszMessage; + //private unsafe _MI_Operation* pmiOperation; + //private _MI_PromptType promptType; + //private _MI_Result modopt(CallConvCdecl) *(_MI_Operation*, _MI_OperationCallback_ResponseType) promptUserResult; + //private unsafe ushort modopt(IsConst)* wszMessage; - // Methods - internal unsafe ExceptionSafePromptUserCallback(_MI_Operation* pmiOperation, void* callbackContext, ushort modopt(IsConst)* wszMessage, _MI_PromptType promptType, _MI_Result modopt(CallConvCdecl) *(_MI_Operation*, _MI_OperationCallback_ResponseType) promptUserResult); - protected override void InvokeUserCallback(); + // Methods + //internal unsafe ExceptionSafePromptUserCallback(_MI_Operation* pmiOperation, void* callbackContext, ushort modopt(IsConst)* wszMessage, _MI_PromptType promptType, _MI_Result modopt(CallConvCdecl) *(_MI_Operation*, _MI_OperationCallback_ResponseType) promptUserResult); + protected override void InvokeUserCallback() + { + throw new NotImplementedException(); + } } internal class ExceptionSafeStreamedParameterResultCallback : ExceptionSafeCallbackBase { // Fields - private _MI_Type miType; - private unsafe _MI_Operation* pmiOperation; - private unsafe _MI_Value modopt(IsConst)* pmiParameterValue; - private _MI_Result modopt(CallConvCdecl) *(_MI_Operation*) resultAcknowledgement; - private unsafe ushort modopt(IsConst)* wszParameterName; + //private _MI_Type miType; + //private unsafe _MI_Operation* pmiOperation; + //private unsafe _MI_Value modopt(IsConst)* pmiParameterValue; + //private _MI_Result modopt(CallConvCdecl) *(_MI_Operation*) resultAcknowledgement; + //private unsafe ushort modopt(IsConst)* wszParameterName; - // Methods - internal unsafe ExceptionSafeStreamedParameterResultCallback(_MI_Operation* pmiOperation, void* callbackContext, ushort modopt(IsConst)* wszParameterName, _MI_Type miType, _MI_Value modopt(IsConst)* pmiParameterValue, _MI_Result modopt(CallConvCdecl) *(_MI_Operation*) resultAcknowledgement); - protected override void InvokeUserCallback(); + // Methods + //internal unsafe ExceptionSafeStreamedParameterResultCallback(_MI_Operation* pmiOperation, void* callbackContext, ushort modopt(IsConst)* wszParameterName, _MI_Type miType, _MI_Value modopt(IsConst)* pmiParameterValue, _MI_Result modopt(CallConvCdecl) *(_MI_Operation*) resultAcknowledgement); + protected override void InvokeUserCallback() + { + throw new NotImplementedException(); + } } internal class ExceptionSafeWriteErrorCallback : ExceptionSafeCallbackBase { // Fields - private unsafe _MI_Instance* pmiInstance; - private unsafe _MI_Operation* pmiOperation; - private _MI_Result modopt(CallConvCdecl) *(_MI_Operation*, _MI_OperationCallback_ResponseType) writeErrorResult; + //private unsafe _MI_Instance* pmiInstance; + //private unsafe _MI_Operation* pmiOperation; + //private _MI_Result modopt(CallConvCdecl) *(_MI_Operation*, _MI_OperationCallback_ResponseType) writeErrorResult; - // Methods - internal unsafe ExceptionSafeWriteErrorCallback(_MI_Operation* pmiOperation, void* callbackContext, _MI_Instance* pmiInstance, _MI_Result modopt(CallConvCdecl) *(_MI_Operation*, _MI_OperationCallback_ResponseType) writeErrorResult); - protected override void InvokeUserCallback(); + // Methods + //internal unsafe ExceptionSafeWriteErrorCallback(_MI_Operation* pmiOperation, void* callbackContext, _MI_Instance* pmiInstance, _MI_Result modopt(CallConvCdecl) *(_MI_Operation*, _MI_OperationCallback_ResponseType) writeErrorResult); + protected override void InvokeUserCallback() + { + throw new NotImplementedException(); + } } internal class ExceptionSafeWriteMessageCallback : ExceptionSafeCallbackBase { // Fields - private uint channel; - private unsafe _MI_Operation* pmiOperation; - private unsafe ushort modopt(IsConst)* wszMessage; + //private uint channel; + //private unsafe _MI_Operation* pmiOperation; + //private unsafe ushort modopt(IsConst)* wszMessage; - // Methods - internal unsafe ExceptionSafeWriteMessageCallback(_MI_Operation* pmiOperation, void* callbackContext, uint channel, ushort modopt(IsConst)* wszMessage); - protected override void InvokeUserCallback(); + // Methods + //internal unsafe ExceptionSafeWriteMessageCallback(_MI_Operation* pmiOperation, void* callbackContext, uint channel, ushort modopt(IsConst)* wszMessage); + protected override void InvokeUserCallback() + { + throw new NotImplementedException(); + } } internal class ExceptionSafeWriteProgressCallback : ExceptionSafeCallbackBase { // Fields - private uint percentageComplete; - private unsafe _MI_Operation* pmiOperation; - private uint secondsRemaining; - private unsafe ushort modopt(IsConst)* wszActivity; - private unsafe ushort modopt(IsConst)* wszCurrentOperation; - private unsafe ushort modopt(IsConst)* wszStatusDescription; + //private uint percentageComplete; + //private unsafe _MI_Operation* pmiOperation; + //private uint secondsRemaining; + //private unsafe ushort modopt(IsConst)* wszActivity; + //private unsafe ushort modopt(IsConst)* wszCurrentOperation; + //private unsafe ushort modopt(IsConst)* wszStatusDescription; - // Methods - internal unsafe ExceptionSafeWriteProgressCallback(_MI_Operation* pmiOperation, void* callbackContext, ushort modopt(IsConst)* wszActivity, ushort modopt(IsConst)* wszCurrentOperation, ushort modopt(IsConst)* wszStatusDescription, uint percentageComplete, uint secondsRemaining); - protected override void InvokeUserCallback(); + // Methods + //internal unsafe ExceptionSafeWriteProgressCallback(_MI_Operation* pmiOperation, void* callbackContext, ushort modopt(IsConst)* wszActivity, ushort modopt(IsConst)* wszCurrentOperation, ushort modopt(IsConst)* wszStatusDescription, uint percentageComplete, uint secondsRemaining); + protected override void InvokeUserCallback() + { + throw new NotImplementedException(); + } } internal class Helpers { // Methods - private Helpers(); - internal static IntPtr GetCurrentSecurityToken(); - internal static IntPtr StringToHGlobalUni(string s); - internal static void ZeroFreeGlobalAllocUnicode(IntPtr s); + private Helpers() + { + throw new NotImplementedException(); + } + internal static IntPtr GetCurrentSecurityToken() + { + throw new NotImplementedException(); + } + internal static IntPtr StringToHGlobalUni(string s) + { + throw new NotImplementedException(); + } + internal static void ZeroFreeGlobalAllocUnicode(IntPtr s) + { + throw new NotImplementedException(); + } + } + + internal class InstanceHandle : SafeHandleZeroOrMinusOneIsInvalid + { + internal void AssertValidInternalState() + { + throw new NotImplementedException(); + } + public void Dispose() + { + throw new NotImplementedException(); + } + internal delegate void OnHandleReleasedDelegate(); + internal MiResult ReleaseHandleAsynchronously(OnHandleReleasedDelegate completionCallback) + { + throw new NotImplementedException(); + } + internal MiResult ReleaseHandleSynchronously() + { + throw new NotImplementedException(); + } + + // should be part of SafeHandleZeroOrMinusOneIsInvalid + public bool IsInvalid { get; } } internal class InstanceMethods { // Fields - internal static ValueType modopt(DateTime) modopt(IsBoxed) maxValidCimTimestamp; + //internal static ValueType modopt(DateTime) modopt(IsBoxed) maxValidCimTimestamp; - // Methods - static InstanceMethods(); - private InstanceMethods(); - internal static MiResult AddElement(InstanceHandle handle, string name, object value, MiType type, MiFlags flags); - internal static MiResult ClearElementAt(InstanceHandle handle, int index); - internal static MiResult Clone(InstanceHandle instanceHandleToClone, out InstanceHandle clonedInstanceHandle); - internal static unsafe object ConvertFromMiValue(MiType type, _MI_Value modopt(IsConst)* pmiValue); - internal static unsafe void ConvertManagedObjectToMiDateTime(object managedValue, _MI_Datetime* pmiValue); - internal static unsafe object ConvertMiDateTimeToManagedObject(_MI_Datetime modopt(IsConst)* pmiValue); - internal static unsafe IEnumerable ConvertToMiValue(MiType type, object managedValue, _MI_Value* pmiValue); - internal static MiResult GetClass(InstanceHandle instanceHandle, out ClassHandle classHandle); - internal static MiResult GetClassName(InstanceHandle handle, out string className); - internal static MiResult GetElement_GetIndex(InstanceHandle handle, string name, out int index); - internal static MiResult GetElementAt_GetFlags(InstanceHandle handle, int index, out MiFlags flags); - internal static MiResult GetElementAt_GetName(InstanceHandle handle, int index, out string name); - internal static MiResult GetElementAt_GetType(InstanceHandle handle, int index, out MiType type); - internal static MiResult GetElementAt_GetValue(InstanceHandle handle, int index, out object value); - internal static MiResult GetElementCount(InstanceHandle handle, out int elementCount); - internal static MiResult GetNamespace(InstanceHandle handle, out string nameSpace); - internal static MiResult GetServerName(InstanceHandle handle, out string serverName); - internal static unsafe void ReleaseMiValue(MiType type, _MI_Value* pmiValue, IEnumerable dangerousHandleAccessors); - internal static MiResult SetElementAt_SetNotModifiedFlag(InstanceHandle handle, int index, [MarshalAs(UnmanagedType.U1)] bool notModifiedFlag); - internal static MiResult SetElementAt_SetValue(InstanceHandle handle, int index, object newValue); - internal static MiResult SetNamespace(InstanceHandle handle, string nameSpace); - internal static MiResult SetServerName(InstanceHandle handle, string serverName); - internal static void ThrowIfMismatchedType(MiType type, object managedValue); + // Methods + static InstanceMethods() + { + throw new NotImplementedException(); + } + private InstanceMethods() + { + throw new NotImplementedException(); + } + internal static MiResult AddElement(InstanceHandle handle, string name, object value, MiType type, MiFlags flags) + { + throw new NotImplementedException(); + } + internal static MiResult ClearElementAt(InstanceHandle handle, int index) + { + throw new NotImplementedException(); + } + internal static MiResult Clone(InstanceHandle instanceHandleToClone, out InstanceHandle clonedInstanceHandle) + { + throw new NotImplementedException(); + } + //internal static unsafe object ConvertFromMiValue(MiType type, _MI_Value modopt(IsConst)* pmiValue); + //internal static unsafe void ConvertManagedObjectToMiDateTime(object managedValue, _MI_Datetime* pmiValue); + //internal static unsafe object ConvertMiDateTimeToManagedObject(_MI_Datetime modopt(IsConst)* pmiValue); + //internal static unsafe IEnumerable ConvertToMiValue(MiType type, object managedValue, _MI_Value* pmiValue); + internal static MiResult GetClass(InstanceHandle instanceHandle, out ClassHandle classHandle) + { + throw new NotImplementedException(); + } + internal static MiResult GetClassName(InstanceHandle handle, out string className) + { + throw new NotImplementedException(); + } + internal static MiResult GetElement_GetIndex(InstanceHandle handle, string name, out int index) + { + throw new NotImplementedException(); + } + internal static MiResult GetElementAt_GetFlags(InstanceHandle handle, int index, out MiFlags flags) + { + throw new NotImplementedException(); + } + internal static MiResult GetElementAt_GetName(InstanceHandle handle, int index, out string name) + { + throw new NotImplementedException(); + } + internal static MiResult GetElementAt_GetType(InstanceHandle handle, int index, out MiType type) + { + throw new NotImplementedException(); + } + internal static MiResult GetElementAt_GetValue(InstanceHandle handle, int index, out object value) + { + throw new NotImplementedException(); + } + internal static MiResult GetElementCount(InstanceHandle handle, out int elementCount) + { + throw new NotImplementedException(); + } + internal static MiResult GetNamespace(InstanceHandle handle, out string nameSpace) + { + throw new NotImplementedException(); + } + internal static MiResult GetServerName(InstanceHandle handle, out string serverName) + { + throw new NotImplementedException(); + } + //internal static unsafe void ReleaseMiValue(MiType type, _MI_Value* pmiValue, IEnumerable dangerousHandleAccessors); + internal static MiResult SetElementAt_SetNotModifiedFlag(InstanceHandle handle, int index, [MarshalAs(UnmanagedType.U1)] bool notModifiedFlag) + { + throw new NotImplementedException(); + } + internal static MiResult SetElementAt_SetValue(InstanceHandle handle, int index, object newValue) + { + throw new NotImplementedException(); + } + internal static MiResult SetNamespace(InstanceHandle handle, string nameSpace) + { + throw new NotImplementedException(); + } + internal static MiResult SetServerName(InstanceHandle handle, string serverName) + { + throw new NotImplementedException(); + } + internal static void ThrowIfMismatchedType(MiType type, object managedValue) + { + throw new NotImplementedException(); + } } internal enum MiCallbackMode @@ -569,20 +1130,56 @@ namespace Microsoft.Management.Infrastructure.Native internal class NativeCimCredential { // Methods - private NativeCimCredential(); - internal static void CreateCimCredential(string authenticationMechanism, out NativeCimCredentialHandle credentialHandle); - internal static void CreateCimCredential(string authenticationMechanism, string certificateThumbprint, out NativeCimCredentialHandle credentialHandle); - internal static void CreateCimCredential(string authenticationMechanism, string domain, string userName, SecureString password, out NativeCimCredentialHandle credentialHandle); + private NativeCimCredential() + { + throw new NotImplementedException(); + } + internal static void CreateCimCredential(string authenticationMechanism, out NativeCimCredentialHandle credentialHandle) + { + throw new NotImplementedException(); + } + internal static void CreateCimCredential(string authenticationMechanism, string certificateThumbprint, out NativeCimCredentialHandle credentialHandle) + { + throw new NotImplementedException(); + } + internal static void CreateCimCredential(string authenticationMechanism, string domain, string userName, SecureString password, out NativeCimCredentialHandle credentialHandle) + { + throw new NotImplementedException(); + } + } + + internal class NativeCimCredentialHandle : SafeHandleZeroOrMinusOneIsInvalid + { + internal void AssertValidInternalState() + { + throw new NotImplementedException(); + } + public void Dispose() + { + throw new NotImplementedException(); + } + internal delegate void OnHandleReleasedDelegate(); + internal MiResult ReleaseHandleAsynchronously(OnHandleReleasedDelegate completionCallback) + { + throw new NotImplementedException(); + } + internal MiResult ReleaseHandleSynchronously() + { + throw new NotImplementedException(); + } } internal class OperationCallbackProcessingContext { // Fields - private bool inUserCode; - private object managedOperationContext; + //private bool inUserCode; + //private object managedOperationContext; // Methods - internal OperationCallbackProcessingContext(object managedOperationContext); + internal OperationCallbackProcessingContext(object managedOperationContext) + { + throw new NotImplementedException(); + } // Properties internal bool InUserCode {[return: MarshalAs(UnmanagedType.U1)] get;[param: MarshalAs(UnmanagedType.U1)] set; } @@ -592,24 +1189,33 @@ namespace Microsoft.Management.Infrastructure.Native internal class OperationCallbacks { // Fields - private ClassCallbackDelegate ClassCallback; - private IndicationResultCallbackDelegate IndicationResultCallback; - private InstanceResultCallbackDelegate InstanceResultCallback; - private InternalErrorCallbackDelegate InternalErrorCallback; - private object ManagedOperationContext; - private PromptUserCallbackDelegate PromptUserCallback; - private StreamedParameterCallbackDelegate StreamedParameterCallback; - private WriteErrorCallbackDelegate WriteErrorCallback; - private WriteMessageCallbackDelegate WriteMessageCallback; - private WriteProgressCallbackDelegate WriteProgressCallback; - private static Action, Action> userFilteredExceptionHandler; + //private ClassCallbackDelegate ClassCallback; + //private IndicationResultCallbackDelegate IndicationResultCallback; + //private InstanceResultCallbackDelegate InstanceResultCallback; + //private InternalErrorCallbackDelegate InternalErrorCallback; + //private object ManagedOperationContext; + //private PromptUserCallbackDelegate PromptUserCallback; + //private StreamedParameterCallbackDelegate StreamedParameterCallback; + //private WriteErrorCallbackDelegate WriteErrorCallback; + //private WriteMessageCallbackDelegate WriteMessageCallback; + //private WriteProgressCallbackDelegate WriteProgressCallback; + //private static Action, Action> userFilteredExceptionHandler; // Methods - static OperationCallbacks(); - public OperationCallbacks(); - internal static void InvokeWithUserFilteredExceptionHandler(Action tryBody, Func userFilter, Action catchBody); - [return: MarshalAs(UnmanagedType.U1)] - internal unsafe bool SetMiOperationCallbacks(_MI_OperationCallbacks* pmiOperationCallbacks, MI_OperationWrapper* pmiOperationWrapper); + static OperationCallbacks() + { + throw new NotImplementedException(); + } + public OperationCallbacks() + { + throw new NotImplementedException(); + } + internal static void InvokeWithUserFilteredExceptionHandler(Action tryBody, Func userFilter, Action catchBody) + { + throw new NotImplementedException(); + } + //[return: MarshalAs(UnmanagedType.U1)] + //internal unsafe bool SetMiOperationCallbacks(_MI_OperationCallbacks* pmiOperationCallbacks, MI_OperationWrapper* pmiOperationWrapper); // Properties [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "False positive from FxCop - this property is used in nativeOperationCallbacks.cpp")] @@ -656,179 +1262,383 @@ namespace Microsoft.Management.Infrastructure.Native internal class OperationCallbacksDefinitions { // Methods - public OperationCallbacksDefinitions(); - internal static unsafe void ClassAppDomainProxy(_MI_Operation* pmiOperation, void* callbackContext, _MI_Class modopt(IsConst)* pmiClass, byte moreResults, _MI_Result resultCode, ushort modopt(IsConst)* errorString, _MI_Instance modopt(IsConst)* pmiErrorDetails, _MI_Result modopt(CallConvCdecl) *(_MI_Operation*) resultAcknowledgement); - internal static unsafe void IndicationAppDomainProxy(_MI_Operation* pmiOperation, void* callbackContext, _MI_Instance modopt(IsConst)* pmiInstance, ushort modopt(IsConst)* bookmark, ushort modopt(IsConst)* machineID, byte moreResults, _MI_Result resultCode, ushort modopt(IsConst)* errorString, _MI_Instance modopt(IsConst)* pmiErrorDetails, _MI_Result modopt(CallConvCdecl) *(_MI_Operation*) resultAcknowledgement); - internal static unsafe void InstanceResultAppDomainProxy(_MI_Operation* pmiOperation, void* callbackContext, _MI_Instance modopt(IsConst)* pmiInstance, byte moreResults, _MI_Result resultCode, ushort modopt(IsConst)* errorString, _MI_Instance modopt(IsConst)* pmiErrorDetails, _MI_Result modopt(CallConvCdecl) *(_MI_Operation*) resultAcknowledgement); - internal static unsafe void PromptUserAppDomainProxy(_MI_Operation* pmiOperation, void* callbackContext, ushort modopt(IsConst)* wszMessage, _MI_PromptType promptType, _MI_Result modopt(CallConvCdecl) *(_MI_Operation*, _MI_OperationCallback_ResponseType) promptUserResult); - internal static unsafe void StreamedParameterResultAppDomainProxy(_MI_Operation* pmiOperation, void* callbackContext, ushort modopt(IsConst)* wszParameterName, _MI_Type miType, _MI_Value modopt(IsConst)* pmiParameterValue, _MI_Result modopt(CallConvCdecl) *(_MI_Operation*) resultAcknowledgement); - internal static unsafe void WriteErrorAppDomainProxy(_MI_Operation* pmiOperation, void* callbackContext, _MI_Instance* pmiInstance, _MI_Result modopt(CallConvCdecl) *(_MI_Operation*, _MI_OperationCallback_ResponseType) writeErrorResult); - internal static unsafe void WriteMessageAppDomainProxy(_MI_Operation* pmiOperation, void* callbackContext, uint channel, ushort modopt(IsConst)* wszMessage); - internal static unsafe void WriteProgressAppDomainProxy(_MI_Operation* pmiOperation, void* callbackContext, ushort modopt(IsConst)* wszActivity, ushort modopt(IsConst)* wszCurrentOperation, ushort modopt(IsConst)* wszStatusDescription, uint percentageComplete, uint secondsRemaining); + public OperationCallbacksDefinitions() + { + throw new NotImplementedException(); + } + //internal static unsafe void ClassAppDomainProxy(_MI_Operation* pmiOperation, void* callbackContext, _MI_Class modopt(IsConst)* pmiClass, byte moreResults, _MI_Result resultCode, ushort modopt(IsConst)* errorString, _MI_Instance modopt(IsConst)* pmiErrorDetails, _MI_Result modopt(CallConvCdecl) *(_MI_Operation*) resultAcknowledgement); + //internal static unsafe void IndicationAppDomainProxy(_MI_Operation* pmiOperation, void* callbackContext, _MI_Instance modopt(IsConst)* pmiInstance, ushort modopt(IsConst)* bookmark, ushort modopt(IsConst)* machineID, byte moreResults, _MI_Result resultCode, ushort modopt(IsConst)* errorString, _MI_Instance modopt(IsConst)* pmiErrorDetails, _MI_Result modopt(CallConvCdecl) *(_MI_Operation*) resultAcknowledgement); + //internal static unsafe void InstanceResultAppDomainProxy(_MI_Operation* pmiOperation, void* callbackContext, _MI_Instance modopt(IsConst)* pmiInstance, byte moreResults, _MI_Result resultCode, ushort modopt(IsConst)* errorString, _MI_Instance modopt(IsConst)* pmiErrorDetails, _MI_Result modopt(CallConvCdecl) *(_MI_Operation*) resultAcknowledgement); + //internal static unsafe void PromptUserAppDomainProxy(_MI_Operation* pmiOperation, void* callbackContext, ushort modopt(IsConst)* wszMessage, _MI_PromptType promptType, _MI_Result modopt(CallConvCdecl) *(_MI_Operation*, _MI_OperationCallback_ResponseType) promptUserResult); + //internal static unsafe void StreamedParameterResultAppDomainProxy(_MI_Operation* pmiOperation, void* callbackContext, ushort modopt(IsConst)* wszParameterName, _MI_Type miType, _MI_Value modopt(IsConst)* pmiParameterValue, _MI_Result modopt(CallConvCdecl) *(_MI_Operation*) resultAcknowledgement); + //internal static unsafe void WriteErrorAppDomainProxy(_MI_Operation* pmiOperation, void* callbackContext, _MI_Instance* pmiInstance, _MI_Result modopt(CallConvCdecl) *(_MI_Operation*, _MI_OperationCallback_ResponseType) writeErrorResult); + //internal static unsafe void WriteMessageAppDomainProxy(_MI_Operation* pmiOperation, void* callbackContext, uint channel, ushort modopt(IsConst)* wszMessage); + //internal static unsafe void WriteProgressAppDomainProxy(_MI_Operation* pmiOperation, void* callbackContext, ushort modopt(IsConst)* wszActivity, ushort modopt(IsConst)* wszCurrentOperation, ushort modopt(IsConst)* wszStatusDescription, uint percentageComplete, uint secondsRemaining); // Nested Types - internal unsafe delegate void ClassAppDomainProxyDelegate(_MI_Operation* pmiOperation, void* callbackContext, _MI_Class modopt(IsConst)* pmiClass, byte moreResults, _MI_Result resultCode, ushort modopt(IsConst)* errorString, _MI_Instance modopt(IsConst)* pmiErrorDetails, _MI_Result modopt(CallConvCdecl) *(_MI_Operation*) resultAcknowledgement); + //internal unsafe delegate void ClassAppDomainProxyDelegate(_MI_Operation* pmiOperation, void* callbackContext, _MI_Class modopt(IsConst)* pmiClass, byte moreResults, _MI_Result resultCode, ushort modopt(IsConst)* errorString, _MI_Instance modopt(IsConst)* pmiErrorDetails, _MI_Result modopt(CallConvCdecl) *(_MI_Operation*) resultAcknowledgement); - internal unsafe delegate void IndicationAppDomainProxyDelegate(_MI_Operation* pmiOperation, void* callbackContext, _MI_Instance modopt(IsConst)* pmiInstance, ushort modopt(IsConst)* bookmark, ushort modopt(IsConst)* machineID, byte moreResults, _MI_Result resultCode, ushort modopt(IsConst)* errorString, _MI_Instance modopt(IsConst)* pmiErrorDetails, _MI_Result modopt(CallConvCdecl) *(_MI_Operation*) resultAcknowledgement); + //internal unsafe delegate void IndicationAppDomainProxyDelegate(_MI_Operation* pmiOperation, void* callbackContext, _MI_Instance modopt(IsConst)* pmiInstance, ushort modopt(IsConst)* bookmark, ushort modopt(IsConst)* machineID, byte moreResults, _MI_Result resultCode, ushort modopt(IsConst)* errorString, _MI_Instance modopt(IsConst)* pmiErrorDetails, _MI_Result modopt(CallConvCdecl) *(_MI_Operation*) resultAcknowledgement); - internal unsafe delegate void InstanceResultAppDomainProxyDelegate(_MI_Operation* pmiOperation, void* callbackContext, _MI_Instance modopt(IsConst)* pmiInstance, byte moreResults, _MI_Result resultCode, ushort modopt(IsConst)* errorString, _MI_Instance modopt(IsConst)* pmiErrorDetails, _MI_Result modopt(CallConvCdecl) *(_MI_Operation*) resultAcknowledgement); + //internal unsafe delegate void InstanceResultAppDomainProxyDelegate(_MI_Operation* pmiOperation, void* callbackContext, _MI_Instance modopt(IsConst)* pmiInstance, byte moreResults, _MI_Result resultCode, ushort modopt(IsConst)* errorString, _MI_Instance modopt(IsConst)* pmiErrorDetails, _MI_Result modopt(CallConvCdecl) *(_MI_Operation*) resultAcknowledgement); - internal unsafe delegate void PromptUserAppDomainProxyDelegate(_MI_Operation* pmiOperation, void* callbackContext, ushort modopt(IsConst)* wszMessage, _MI_PromptType promptType, _MI_Result modopt(CallConvCdecl) *(_MI_Operation*, _MI_OperationCallback_ResponseType) promptUserResult); + //internal unsafe delegate void PromptUserAppDomainProxyDelegate(_MI_Operation* pmiOperation, void* callbackContext, ushort modopt(IsConst)* wszMessage, _MI_PromptType promptType, _MI_Result modopt(CallConvCdecl) *(_MI_Operation*, _MI_OperationCallback_ResponseType) promptUserResult); - internal unsafe delegate void StreamedParameterResultAppDomainProxyDelegate(_MI_Operation* pmiOperation, void* callbackContext, ushort modopt(IsConst)* wszParameterName, _MI_Type miType, _MI_Value modopt(IsConst)* pmiParameterValue, _MI_Result modopt(CallConvCdecl) *(_MI_Operation*) resultAcknowledgement); + //internal unsafe delegate void StreamedParameterResultAppDomainProxyDelegate(_MI_Operation* pmiOperation, void* callbackContext, ushort modopt(IsConst)* wszParameterName, _MI_Type miType, _MI_Value modopt(IsConst)* pmiParameterValue, _MI_Result modopt(CallConvCdecl) *(_MI_Operation*) resultAcknowledgement); - internal unsafe delegate void WriteErrorAppDomainProxyDelegate(_MI_Operation* pmiOperation, void* callbackContext, _MI_Instance* pmiInstance, _MI_Result modopt(CallConvCdecl) *(_MI_Operation*, _MI_OperationCallback_ResponseType) writeErrorResult); + //internal unsafe delegate void WriteErrorAppDomainProxyDelegate(_MI_Operation* pmiOperation, void* callbackContext, _MI_Instance* pmiInstance, _MI_Result modopt(CallConvCdecl) *(_MI_Operation*, _MI_OperationCallback_ResponseType) writeErrorResult); - internal unsafe delegate void WriteMessageAppDomainProxyDelegate(_MI_Operation* pmiOperation, void* callbackContext, uint channel, ushort modopt(IsConst)* wszMessage); + //internal unsafe delegate void WriteMessageAppDomainProxyDelegate(_MI_Operation* pmiOperation, void* callbackContext, uint channel, ushort modopt(IsConst)* wszMessage); - internal unsafe delegate void WriteProgressAppDomainProxyDelegate(_MI_Operation* pmiOperation, void* callbackContext, ushort modopt(IsConst)* wszActivity, ushort modopt(IsConst)* wszCurrentOperation, ushort modopt(IsConst)* wszStatusDescription, uint percentageComplete, uint secondsRemaining); + //internal unsafe delegate void WriteProgressAppDomainProxyDelegate(_MI_Operation* pmiOperation, void* callbackContext, ushort modopt(IsConst)* wszActivity, ushort modopt(IsConst)* wszCurrentOperation, ushort modopt(IsConst)* wszStatusDescription, uint percentageComplete, uint secondsRemaining); + } + + internal class OperationHandle : SafeHandleZeroOrMinusOneIsInvalid + { + internal void AssertValidInternalState() + { + throw new NotImplementedException(); + } + public void Dispose() + { + throw new NotImplementedException(); + } + internal delegate void OnHandleReleasedDelegate(); + internal MiResult ReleaseHandleAsynchronously(OnHandleReleasedDelegate completionCallback) + { + throw new NotImplementedException(); + } + internal MiResult ReleaseHandleSynchronously() + { + throw new NotImplementedException(); + } } internal class OperationMethods { // Methods - private OperationMethods(); + private OperationMethods() + { + throw new NotImplementedException(); + } [SuppressMessage("Microsoft.Reliability", "CA2001:AvoidCallingProblematicMethods", MessageId = "System.Runtime.InteropServices.SafeHandle.DangerousGetHandle", Justification = "C# layer internally manages the lifetime of OperationHandle + have to do this to call inline methods")] - internal static MiResult Cancel(OperationHandle operationHandle, MiCancellationReason cancellationReason); + internal static MiResult Cancel(OperationHandle operationHandle, MiCancellationReason cancellationReason) + { + throw new NotImplementedException(); + } [SuppressMessage("Microsoft.Reliability", "CA2001:AvoidCallingProblematicMethods", MessageId = "System.Runtime.InteropServices.SafeHandle.DangerousGetHandle", Justification = "C# layer internally manages the lifetime of OperationHandle + have to do this to call inline methods")] - internal static MiResult GetClass(OperationHandle operationHandle, out ClassHandle classHandle, out bool moreResults, out MiResult result, out string errorMessage, out InstanceHandle completionDetails); + internal static MiResult GetClass(OperationHandle operationHandle, out ClassHandle classHandle, out bool moreResults, out MiResult result, out string errorMessage, out InstanceHandle completionDetails) + { + throw new NotImplementedException(); + } [SuppressMessage("Microsoft.Reliability", "CA2001:AvoidCallingProblematicMethods", MessageId = "System.Runtime.InteropServices.SafeHandle.DangerousGetHandle", Justification = "C# layer internally manages the lifetime of OperationHandle + have to do this to call inline methods")] - internal static MiResult GetIndication(OperationHandle operationHandle, out InstanceHandle instanceHandle, out string bookmark, out string machineID, out bool moreResults, out MiResult result, out string errorMessage, out InstanceHandle completionDetails); + internal static MiResult GetIndication(OperationHandle operationHandle, out InstanceHandle instanceHandle, out string bookmark, out string machineID, out bool moreResults, out MiResult result, out string errorMessage, out InstanceHandle completionDetails) + { + throw new NotImplementedException(); + } [SuppressMessage("Microsoft.Reliability", "CA2001:AvoidCallingProblematicMethods", MessageId = "System.Runtime.InteropServices.SafeHandle.DangerousGetHandle", Justification = "C# layer internally manages the lifetime of OperationHandle + have to do this to call inline methods")] - internal static MiResult GetInstance(OperationHandle operationHandle, out InstanceHandle instanceHandle, out bool moreResults, out MiResult result, out string errorMessage, out InstanceHandle completionDetails); + internal static MiResult GetInstance(OperationHandle operationHandle, out InstanceHandle instanceHandle, out bool moreResults, out MiResult result, out string errorMessage, out InstanceHandle completionDetails) + { + throw new NotImplementedException(); + } + } + + internal class OperationOptionsHandle : SafeHandleZeroOrMinusOneIsInvalid + { + internal void AssertValidInternalState() + { + throw new NotImplementedException(); + } + public void Dispose() + { + throw new NotImplementedException(); + } + internal delegate void OnHandleReleasedDelegate(); + internal MiResult ReleaseHandleAsynchronously(OnHandleReleasedDelegate completionCallback) + { + throw new NotImplementedException(); + } + internal MiResult ReleaseHandleSynchronously() + { + throw new NotImplementedException(); + } } internal class OperationOptionsMethods { // Methods - private OperationOptionsMethods(); - internal static MiResult Clone(OperationOptionsHandle operationOptionsHandle, out OperationOptionsHandle newOperationOptionsHandle); - internal static MiResult GetPromptUserModeOption(OperationOptionsHandle operationOptionsHandle, out MiCallbackMode mode); - internal static MiResult GetResourceUri(OperationOptionsHandle operationOptionsHandle, out string resourceUri); - internal static MiResult GetResourceUriPrefix(OperationOptionsHandle operationOptionsHandle, out string resourceUriPrefix); - internal static MiResult GetTimeout(OperationOptionsHandle operationOptionsHandle, out TimeSpan timeout); - internal static MiResult GetUseMachineID(OperationOptionsHandle operationOptionsHandle, out bool useMachineId); - internal static MiResult GetWriteErrorModeOption(OperationOptionsHandle operationOptionsHandle, out MiCallbackMode mode); - internal static MiResult SetCustomOption(OperationOptionsHandle operationOptionsHandle, string optionName, object optionValue, MiType miType, [MarshalAs(UnmanagedType.U1)] bool mustComply); - internal static MiResult SetDisableChannelOption(OperationOptionsHandle operationOptionsHandle, uint channel); - internal static MiResult SetEnableChannelOption(OperationOptionsHandle operationOptionsHandle, uint channel); - internal static MiResult SetOption(OperationOptionsHandle operationOptionsHandle, string optionName, string optionValue); - internal static MiResult SetOption(OperationOptionsHandle operationOptionsHandle, string optionName, uint optionValue); - internal static MiResult SetPromptUserModeOption(OperationOptionsHandle operationOptionsHandle, MiCallbackMode mode); - internal static MiResult SetPromptUserRegularMode(OperationOptionsHandle operationOptionsHandle, MiCallbackMode mode, [MarshalAs(UnmanagedType.U1)] bool ackValue); - internal static MiResult SetResourceUri(OperationOptionsHandle operationOptionsHandle, string resourceUri); - internal static MiResult SetResourceUriPrefix(OperationOptionsHandle operationOptionsHandle, string resourceUriPrefix); - internal static MiResult SetTimeout(OperationOptionsHandle operationOptionsHandle, TimeSpan timeout); - internal static MiResult SetUseMachineID(OperationOptionsHandle operationOptionsHandle, [MarshalAs(UnmanagedType.U1)] bool useMachineId); - internal static MiResult SetWriteErrorModeOption(OperationOptionsHandle operationOptionsHandle, MiCallbackMode mode); + private OperationOptionsMethods() + { + throw new NotImplementedException(); + } + internal static MiResult Clone(OperationOptionsHandle operationOptionsHandle, out OperationOptionsHandle newOperationOptionsHandle) + { + throw new NotImplementedException(); + } + internal static MiResult GetPromptUserModeOption(OperationOptionsHandle operationOptionsHandle, out MiCallbackMode mode) + { + throw new NotImplementedException(); + } + internal static MiResult GetResourceUri(OperationOptionsHandle operationOptionsHandle, out string resourceUri) + { + throw new NotImplementedException(); + } + internal static MiResult GetResourceUriPrefix(OperationOptionsHandle operationOptionsHandle, out string resourceUriPrefix) + { + throw new NotImplementedException(); + } + internal static MiResult GetTimeout(OperationOptionsHandle operationOptionsHandle, out TimeSpan timeout) + { + throw new NotImplementedException(); + } + internal static MiResult GetUseMachineID(OperationOptionsHandle operationOptionsHandle, out bool useMachineId) + { + throw new NotImplementedException(); + } + internal static MiResult GetWriteErrorModeOption(OperationOptionsHandle operationOptionsHandle, out MiCallbackMode mode) + { + throw new NotImplementedException(); + } + internal static MiResult SetCustomOption(OperationOptionsHandle operationOptionsHandle, string optionName, object optionValue, MiType miType, [MarshalAs(UnmanagedType.U1)] bool mustComply) + { + throw new NotImplementedException(); + } + internal static MiResult SetDisableChannelOption(OperationOptionsHandle operationOptionsHandle, uint channel) + { + throw new NotImplementedException(); + } + internal static MiResult SetEnableChannelOption(OperationOptionsHandle operationOptionsHandle, uint channel) + { + throw new NotImplementedException(); + } + internal static MiResult SetOption(OperationOptionsHandle operationOptionsHandle, string optionName, string optionValue) + { + throw new NotImplementedException(); + } + internal static MiResult SetOption(OperationOptionsHandle operationOptionsHandle, string optionName, uint optionValue) + { + throw new NotImplementedException(); + } + internal static MiResult SetPromptUserModeOption(OperationOptionsHandle operationOptionsHandle, MiCallbackMode mode) + { + throw new NotImplementedException(); + } + internal static MiResult SetPromptUserRegularMode(OperationOptionsHandle operationOptionsHandle, MiCallbackMode mode, [MarshalAs(UnmanagedType.U1)] bool ackValue) + { + throw new NotImplementedException(); + } + internal static MiResult SetResourceUri(OperationOptionsHandle operationOptionsHandle, string resourceUri) + { + throw new NotImplementedException(); + } + internal static MiResult SetResourceUriPrefix(OperationOptionsHandle operationOptionsHandle, string resourceUriPrefix) + { + throw new NotImplementedException(); + } + internal static MiResult SetTimeout(OperationOptionsHandle operationOptionsHandle, TimeSpan timeout) + { + throw new NotImplementedException(); + } + internal static MiResult SetUseMachineID(OperationOptionsHandle operationOptionsHandle, [MarshalAs(UnmanagedType.U1)] bool useMachineId) + { + throw new NotImplementedException(); + } + internal static MiResult SetWriteErrorModeOption(OperationOptionsHandle operationOptionsHandle, MiCallbackMode mode) + { + throw new NotImplementedException(); + } + } + + internal class SerializerHandle : SafeHandleZeroOrMinusOneIsInvalid + { + internal void AssertValidInternalState() + { + throw new NotImplementedException(); + } + public void Dispose() + { + throw new NotImplementedException(); + } + internal delegate void OnHandleReleasedDelegate(); + internal MiResult ReleaseHandleAsynchronously(OnHandleReleasedDelegate completionCallback) + { + throw new NotImplementedException(); + } + internal MiResult ReleaseHandleSynchronously() + { + throw new NotImplementedException(); + } } internal class SerializerMethods { // Methods - private SerializerMethods(); - internal static MiResult SerializeClass(SerializerHandle serializerHandle, uint flags, ClassHandle instanceHandle, byte[] outputBuffer, uint offset, out uint outputBufferUsed); - internal static MiResult SerializeInstance(SerializerHandle serializerHandle, uint flags, InstanceHandle instanceHandle, byte[] outputBuffer, uint offset, out uint outputBufferUsed); + private SerializerMethods() + { + throw new NotImplementedException(); + } + internal static MiResult SerializeClass(SerializerHandle serializerHandle, uint flags, ClassHandle instanceHandle, byte[] outputBuffer, uint offset, out uint outputBufferUsed) + { + throw new NotImplementedException(); + } + internal static MiResult SerializeInstance(SerializerHandle serializerHandle, uint flags, InstanceHandle instanceHandle, byte[] outputBuffer, uint offset, out uint outputBufferUsed) + { + throw new NotImplementedException(); + } } internal class SessionHandleCallbackDefinitions { // Methods - public SessionHandleCallbackDefinitions(); - internal static unsafe void SessionHandle_ReleaseHandle_CallbackWrapper_Invoke_Managed(_SessionHandle_ReleaseHandle_CallbackWrapper* pCallbackWrapper); - internal static unsafe void SessionHandle_ReleaseHandle_CallbackWrapper_Release_Managed(_SessionHandle_ReleaseHandle_CallbackWrapper* pCallbackWrapper); + public SessionHandleCallbackDefinitions() + { + throw new NotImplementedException(); + } + //internal static unsafe void SessionHandle_ReleaseHandle_CallbackWrapper_Invoke_Managed(_SessionHandle_ReleaseHandle_CallbackWrapper* pCallbackWrapper); + //internal static unsafe void SessionHandle_ReleaseHandle_CallbackWrapper_Release_Managed(_SessionHandle_ReleaseHandle_CallbackWrapper* pCallbackWrapper); // Nested Types - internal unsafe delegate void SessionHandle_ReleaseHandle_CallbackWrapper_Invoke_Managed_Delegate(_SessionHandle_ReleaseHandle_CallbackWrapper* pCallbackWrapper); + //internal unsafe delegate void SessionHandle_ReleaseHandle_CallbackWrapper_Invoke_Managed_Delegate(_SessionHandle_ReleaseHandle_CallbackWrapper* pCallbackWrapper); - internal unsafe delegate void SessionHandle_ReleaseHandle_CallbackWrapper_Release_Managed_Delegate(_SessionHandle_ReleaseHandle_CallbackWrapper* pCallbackWrapper); + //internal unsafe delegate void SessionHandle_ReleaseHandle_CallbackWrapper_Release_Managed_Delegate(_SessionHandle_ReleaseHandle_CallbackWrapper* pCallbackWrapper); + } + + internal class SessionHandle : SafeHandleZeroOrMinusOneIsInvalid + { + internal void AssertValidInternalState() + { + throw new NotImplementedException(); + } + public void Dispose() + { + throw new NotImplementedException(); + } + internal delegate void OnHandleReleasedDelegate(); + internal MiResult ReleaseHandleAsynchronously(OnHandleReleasedDelegate completionCallback) + { + throw new NotImplementedException(); + } + internal MiResult ReleaseHandleSynchronously() + { + throw new NotImplementedException(); + } } internal class SessionMethods { // Methods - private SessionMethods(); - internal static void AssociatorInstances(SessionHandle sessionHandle, MiOperationFlags operationFlags, OperationOptionsHandle operationOptionsHandle, string namespaceName, InstanceHandle sourceInstance, string assocClass, string resultClass, string sourceRole, string resultRole, [MarshalAs(UnmanagedType.U1)] bool keysOnly, OperationCallbacks operationCallbacks, out OperationHandle operationHandle); - internal static void CreateInstance(SessionHandle sessionHandle, MiOperationFlags operationFlags, OperationOptionsHandle operationOptionsHandle, string namespaceName, InstanceHandle instanceHandle, OperationCallbacks operationCallbacks, out OperationHandle operationHandle); - internal static void DeleteInstance(SessionHandle sessionHandle, MiOperationFlags operationFlags, OperationOptionsHandle operationOptionsHandle, string namespaceName, InstanceHandle instanceHandle, OperationCallbacks operationCallbacks, out OperationHandle operationHandle); - internal static void EnumerateClasses(SessionHandle sessionHandle, MiOperationFlags operationFlags, OperationOptionsHandle operationOptionsHandle, string namespaceName, string className, [MarshalAs(UnmanagedType.U1)] bool classNamesOnly, OperationCallbacks operationCallbacks, out OperationHandle operationHandle); - internal static void EnumerateInstances(SessionHandle sessionHandle, MiOperationFlags operationFlags, OperationOptionsHandle operationOptionsHandle, string namespaceName, string className, [MarshalAs(UnmanagedType.U1)] bool keysOnly, OperationCallbacks operationCallbacks, out OperationHandle operationHandle); - internal static void GetClass(SessionHandle sessionHandle, MiOperationFlags operationFlags, OperationOptionsHandle operationOptionsHandle, string namespaceName, string className, OperationCallbacks operationCallbacks, out OperationHandle operationHandle); - internal static void GetInstance(SessionHandle sessionHandle, MiOperationFlags operationFlags, OperationOptionsHandle operationOptionsHandle, string namespaceName, InstanceHandle instanceHandle, OperationCallbacks operationCallbacks, out OperationHandle operationHandle); - internal static void Invoke(SessionHandle sessionHandle, MiOperationFlags operationFlags, OperationOptionsHandle operationOptionsHandle, string namespaceName, string className, string methodName, InstanceHandle instanceHandleForTargetOfInvocation, InstanceHandle instanceHandleForMethodParameters, OperationCallbacks operationCallbacks, out OperationHandle operationHandle); - internal static void ModifyInstance(SessionHandle sessionHandle, MiOperationFlags operationFlags, OperationOptionsHandle operationOptionsHandle, string namespaceName, InstanceHandle instanceHandle, OperationCallbacks operationCallbacks, out OperationHandle operationHandle); + private SessionMethods() + { + throw new NotImplementedException(); + } + internal static void AssociatorInstances(SessionHandle sessionHandle, MiOperationFlags operationFlags, OperationOptionsHandle operationOptionsHandle, string namespaceName, InstanceHandle sourceInstance, string assocClass, string resultClass, string sourceRole, string resultRole, [MarshalAs(UnmanagedType.U1)] bool keysOnly, OperationCallbacks operationCallbacks, out OperationHandle operationHandle) + { + throw new NotImplementedException(); + } + internal static void CreateInstance(SessionHandle sessionHandle, MiOperationFlags operationFlags, OperationOptionsHandle operationOptionsHandle, string namespaceName, InstanceHandle instanceHandle, OperationCallbacks operationCallbacks, out OperationHandle operationHandle) + { + throw new NotImplementedException(); + } + internal static void DeleteInstance(SessionHandle sessionHandle, MiOperationFlags operationFlags, OperationOptionsHandle operationOptionsHandle, string namespaceName, InstanceHandle instanceHandle, OperationCallbacks operationCallbacks, out OperationHandle operationHandle) + { + throw new NotImplementedException(); + } + internal static void EnumerateClasses(SessionHandle sessionHandle, MiOperationFlags operationFlags, OperationOptionsHandle operationOptionsHandle, string namespaceName, string className, [MarshalAs(UnmanagedType.U1)] bool classNamesOnly, OperationCallbacks operationCallbacks, out OperationHandle operationHandle) + { + throw new NotImplementedException(); + } + internal static void EnumerateInstances(SessionHandle sessionHandle, MiOperationFlags operationFlags, OperationOptionsHandle operationOptionsHandle, string namespaceName, string className, [MarshalAs(UnmanagedType.U1)] bool keysOnly, OperationCallbacks operationCallbacks, out OperationHandle operationHandle) + { + throw new NotImplementedException(); + } + internal static void GetClass(SessionHandle sessionHandle, MiOperationFlags operationFlags, OperationOptionsHandle operationOptionsHandle, string namespaceName, string className, OperationCallbacks operationCallbacks, out OperationHandle operationHandle) + { + throw new NotImplementedException(); + } + internal static void GetInstance(SessionHandle sessionHandle, MiOperationFlags operationFlags, OperationOptionsHandle operationOptionsHandle, string namespaceName, InstanceHandle instanceHandle, OperationCallbacks operationCallbacks, out OperationHandle operationHandle) + { + throw new NotImplementedException(); + } + internal static void Invoke(SessionHandle sessionHandle, MiOperationFlags operationFlags, OperationOptionsHandle operationOptionsHandle, string namespaceName, string className, string methodName, InstanceHandle instanceHandleForTargetOfInvocation, InstanceHandle instanceHandleForMethodParameters, OperationCallbacks operationCallbacks, out OperationHandle operationHandle) + { + throw new NotImplementedException(); + } + internal static void ModifyInstance(SessionHandle sessionHandle, MiOperationFlags operationFlags, OperationOptionsHandle operationOptionsHandle, string namespaceName, InstanceHandle instanceHandle, OperationCallbacks operationCallbacks, out OperationHandle operationHandle) + { + throw new NotImplementedException(); + } [SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId = "keysOnly")] - internal static void QueryInstances(SessionHandle sessionHandle, MiOperationFlags operationFlags, OperationOptionsHandle operationOptionsHandle, string namespaceName, string queryDialect, string queryExpression, [MarshalAs(UnmanagedType.U1)] bool keysOnly, OperationCallbacks operationCallbacks, out OperationHandle operationHandle); - internal static void ReferenceInstances(SessionHandle sessionHandle, MiOperationFlags operationFlags, OperationOptionsHandle operationOptionsHandle, string namespaceName, InstanceHandle sourceInstance, string associationClassName, string sourceRole, [MarshalAs(UnmanagedType.U1)] bool keysOnly, OperationCallbacks operationCallbacks, out OperationHandle operationHandle); - internal static void Subscribe(SessionHandle sessionHandle, MiOperationFlags operationFlags, OperationOptionsHandle operationOptionsHandle, string namespaceName, string queryDialect, string queryExpression, SubscriptionDeliveryOptionsHandle subscriptionDeliveryOptionsHandle, OperationCallbacks operationCallbacks, out OperationHandle operationHandle); - internal static void TestConnection(SessionHandle sessionHandle, MiOperationFlags operationFlags, OperationCallbacks operationCallbacks, out OperationHandle operationHandle); + internal static void QueryInstances(SessionHandle sessionHandle, MiOperationFlags operationFlags, OperationOptionsHandle operationOptionsHandle, string namespaceName, string queryDialect, string queryExpression, [MarshalAs(UnmanagedType.U1)] bool keysOnly, OperationCallbacks operationCallbacks, out OperationHandle operationHandle) + { + throw new NotImplementedException(); + } + internal static void ReferenceInstances(SessionHandle sessionHandle, MiOperationFlags operationFlags, OperationOptionsHandle operationOptionsHandle, string namespaceName, InstanceHandle sourceInstance, string associationClassName, string sourceRole, [MarshalAs(UnmanagedType.U1)] bool keysOnly, OperationCallbacks operationCallbacks, out OperationHandle operationHandle) + { + throw new NotImplementedException(); + } + internal static void Subscribe(SessionHandle sessionHandle, MiOperationFlags operationFlags, OperationOptionsHandle operationOptionsHandle, string namespaceName, string queryDialect, string queryExpression, SubscriptionDeliveryOptionsHandle subscriptionDeliveryOptionsHandle, OperationCallbacks operationCallbacks, out OperationHandle operationHandle) + { + throw new NotImplementedException(); + } + internal static void TestConnection(SessionHandle sessionHandle, MiOperationFlags operationFlags, OperationCallbacks operationCallbacks, out OperationHandle operationHandle) + { + throw new NotImplementedException(); + } + } + + internal class SubscriptionDeliveryOptionsHandle : SafeHandleZeroOrMinusOneIsInvalid + { + internal void AssertValidInternalState() + { + throw new NotImplementedException(); + } + public void Dispose() + { + throw new NotImplementedException(); + } + internal delegate void OnHandleReleasedDelegate(); + internal MiResult ReleaseHandleAsynchronously(OnHandleReleasedDelegate completionCallback) + { + throw new NotImplementedException(); + } + internal MiResult ReleaseHandleSynchronously() + { + throw new NotImplementedException(); + } } internal class SubscriptionDeliveryOptionsMethods { // Methods - private SubscriptionDeliveryOptionsMethods(); - internal static MiResult AddCredentials(SubscriptionDeliveryOptionsHandle OptionsHandle, string optionName, NativeCimCredentialHandle credentials, uint flags); - internal static MiResult Clone(SubscriptionDeliveryOptionsHandle subscriptionDeliveryOptionsHandle, out SubscriptionDeliveryOptionsHandle newSubscriptionDeliveryOptionsHandle); - internal static MiResult SetDateTime(SubscriptionDeliveryOptionsHandle OptionsHandle, string optionName, object value, uint flags); - internal static MiResult SetInterval(SubscriptionDeliveryOptionsHandle OptionsHandle, string optionName, ValueType modopt(TimeSpan) modopt(IsBoxed) value, uint flags); - internal static MiResult SetNumber(SubscriptionDeliveryOptionsHandle OptionsHandle, string optionName, uint value, uint flags); - internal static MiResult SetString(SubscriptionDeliveryOptionsHandle OptionsHandle, string optionName, string value, uint flags); + private SubscriptionDeliveryOptionsMethods() + { + throw new NotImplementedException(); + } + internal static MiResult AddCredentials(SubscriptionDeliveryOptionsHandle OptionsHandle, string optionName, NativeCimCredentialHandle credentials, uint flags) + { + throw new NotImplementedException(); + } + internal static MiResult Clone(SubscriptionDeliveryOptionsHandle subscriptionDeliveryOptionsHandle, out SubscriptionDeliveryOptionsHandle newSubscriptionDeliveryOptionsHandle) + { + throw new NotImplementedException(); + } + internal static MiResult SetDateTime(SubscriptionDeliveryOptionsHandle OptionsHandle, string optionName, object value, uint flags) + { + throw new NotImplementedException(); + } + //internal static MiResult SetInterval(SubscriptionDeliveryOptionsHandle OptionsHandle, string optionName, ValueType modopt(TimeSpan) modopt(IsBoxed) value, uint flags) + internal static MiResult SetInterval(SubscriptionDeliveryOptionsHandle OptionsHandle, string optionName, ValueType value, uint flags) + { + throw new NotImplementedException(); + } + internal static MiResult SetNumber(SubscriptionDeliveryOptionsHandle OptionsHandle, string optionName, uint value, uint flags) + { + throw new NotImplementedException(); + } + internal static MiResult SetString(SubscriptionDeliveryOptionsHandle OptionsHandle, string optionName, string value, uint flags) + { + throw new NotImplementedException(); + } } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - }