コード例 #1
0
            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);
            }
コード例 #2
0
        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);
            }
        }