internal static unsafe ServiceDescription CreateFromNative(NativeClient.IFabricServiceDescriptionResult nativeResult) { if (nativeResult == null) { return(null); } var description = ServiceDescription.CreateFromNative(nativeResult.get_Description()); GC.KeepAlive(nativeResult); return(description); }
public void ServiceDescription_StatefulDescriptionIsParsed() { ServiceDescription expected = StatefulServiceDescriptionTest.HelperInstance.CreateDefaultDescription(); using (var pc = new PinCollection()) { IntPtr native = expected.ToNative(pc); ServiceDescription actual = ServiceDescription.CreateFromNative(native); HelperInstance.Compare(expected, actual); } }