コード例 #1
0
        internal static unsafe new DllHostHostedUnmanagedDllDescription CreateFromNative(IntPtr nativeDescriptionPtr)
        {
            NativeTypes.FABRIC_DLLHOST_HOSTED_UNMANAGED_DLL_DESCRIPTION *nativeDescription =
                (NativeTypes.FABRIC_DLLHOST_HOSTED_UNMANAGED_DLL_DESCRIPTION *)nativeDescriptionPtr;

            DllHostHostedUnmanagedDllDescription description = new DllHostHostedUnmanagedDllDescription();

            description.DllName = NativeTypes.FromNativeString(nativeDescription->DllName);

            return(description);
        }
コード例 #2
0
        internal static unsafe DllHostHostedDllDescription CreateFromNative(IntPtr nativeDescriptionPtr)
        {
            NativeTypes.FABRIC_DLLHOST_HOSTED_DLL_DESCRIPTION *nativeDescription = (NativeTypes.FABRIC_DLLHOST_HOSTED_DLL_DESCRIPTION *)nativeDescriptionPtr;
            switch (nativeDescription->Kind)
            {
            case NativeTypes.FABRIC_DLLHOST_HOSTED_DLL_KIND.FABRIC_DLLHOST_HOSTED_DLL_KIND_UNMANAGED:
                return(DllHostHostedUnmanagedDllDescription.CreateFromNative(nativeDescription->Value));

            case NativeTypes.FABRIC_DLLHOST_HOSTED_DLL_KIND.FABRIC_DLLHOST_HOSTED_DLL_KIND_MANAGED:
                return(DllHostHostedManagedDllDescription.CreateFromNative(nativeDescription->Value));

            default:
                throw new ArgumentException(StringResources.Error_HostedDllKindUnknown);
            }
        }