internal static unsafe ContainerVolumeDescription CreateFromNative( NativeTypes.FABRIC_CONTAINER_VOLUME_DESCRIPTION nativeDescription) { return(new ContainerVolumeDescription { Source = NativeTypes.FromNativeString(nativeDescription.Source), Destination = NativeTypes.FromNativeString(nativeDescription.Destination), Driver = NativeTypes.FromNativeString(nativeDescription.Driver), IsReadOnly = NativeTypes.FromBOOLEAN(nativeDescription.IsReadOnly), DriverOpts = ContainerDriverOptionDescription.CreateFromNativeList(nativeDescription.DriverOpts) }); }
internal static unsafe ContainerLogConfigDescription CreateFromNative(IntPtr nativePtr) { ReleaseAssert.AssertIfNot( nativePtr != IntPtr.Zero, "ContainerLogConfigDescription.CreateFromNative() has null pointer."); var nativeDescription = *((NativeTypes.FABRIC_CONTAINER_LOG_CONFIG_DESCRIPTION *)nativePtr); return(new ContainerLogConfigDescription { Driver = NativeTypes.FromNativeString(nativeDescription.Driver), DriverOpts = ContainerDriverOptionDescription.CreateFromNativeList(nativeDescription.DriverOpts) }); }
internal static unsafe ContainerDriverOptionDescription CreateFromNative( NativeTypes.FABRIC_CONTAINER_DRIVER_OPTION_DESCRIPTION nativeDescription) { var driverOptionDesc = new ContainerDriverOptionDescription { Name = NativeTypes.FromNativeString(nativeDescription.Name), Value = NativeTypes.FromNativeString(nativeDescription.Value), IsEncrypted = NativeTypes.FromBOOLEAN(nativeDescription.IsEncrypted) }; if (nativeDescription.Reserved != null) { var nativeDescriptionEx = *((NativeTypes.FABRIC_CONTAINER_DRIVER_OPTION_DESCRIPTION_EX1 *)nativeDescription.Reserved); driverOptionDesc.Type = NativeTypes.FromNativeString(nativeDescriptionEx.Type); } return(driverOptionDesc); }