Beispiel #1
0
            private NativeCommon.IFabricAsyncOperationContext GetNodeContextBeginWrapper(TimeSpan timeout, NativeCommon.IFabricAsyncOperationCallback callback)
            {
                var timeoutMilliseconds = Utility.ToMilliseconds(timeout, "timeout");

                return(NativeRuntime.FabricBeginGetNodeContext(
                           timeoutMilliseconds,
                           callback));
            }
Beispiel #2
0
            private NativeCommon.IFabricAsyncOperationContext InitializeFabricRuntimeBeginWrapper(Guid fabricRuntimeGuid, object exitHandler, uint timeout, NativeCommon.IFabricAsyncOperationCallback callback)
            {
                Guid localGuid = fabricRuntimeGuid;

                using (var pin = new PinCollection())
                {
                    return(NativeRuntime.FabricBeginCreateRuntime(ref localGuid, exitHandler as NativeRuntime.IFabricProcessExitHandler, timeout, callback));
                }
            }
Beispiel #3
0
            private NativeCommon.IFabricAsyncOperationContext GetCodePackageActivationContextBeginWrapper(TimeSpan timeout, NativeCommon.IFabricAsyncOperationCallback callback)
            {
                Guid iid = typeof(NativeRuntime.IFabricCodePackageActivationContext).GetTypeInfo().GUID;
                var  timeoutMilliseconds = Utility.ToMilliseconds(timeout, "timeout");

                return(NativeRuntime.FabricBeginGetActivationContext(
                           ref iid,
                           timeoutMilliseconds,
                           callback));
            }
Beispiel #4
0
        internal static void Initialize()
        {
            Managed = new ManagedRuntime();
            Native  = new NativeRuntime();

            Managed.Lock                   = Lock;
            Managed.Unlock                 = Unlock;
            Managed.CloneHandle            = CloneHandle;
            Managed.CreateObject           = CreateObject;
            Managed.HandleEventWithType    = Object.HandleEventWithType;
            Managed.HandleEventWithoutType = Object.HandleEventWithoutType;

            Urho3D_InitializeCSharp(ref Managed, ref Native);
        }
Beispiel #5
0
        internal static unsafe void Initialize()
        {
            Managed = new ManagedRuntime();
            Native  = new NativeRuntime();

            Managed.Lock         = Lock;
            Managed.Unlock       = Unlock;
            Managed.CloneHandle  = CloneHandle;
            Managed.CreateObject = CreateObject;
            Managed.HandleEvent  = Object.HandleEvent;
            Managed.InvokeMethod = InvokeMethod;

            Urho3D_InitializeCSharp(ref Managed, ref Native);
        }
Beispiel #6
0
        private static LocalEseStoreSettings InternalLoadFrom(
            CodePackageActivationContext codePackageActivationContext,
            string configPackageName,
            string sectionName)
        {
            using (var pin = new PinCollection())
            {
                NativeRuntime.IFabricEseLocalStoreSettingsResult nativeResult = NativeRuntime.FabricLoadEseLocalStoreSettings(
                    codePackageActivationContext.NativeActivationContext,
                    pin.AddBlittable(configPackageName),
                    pin.AddBlittable(sectionName));

                return(LocalEseStoreSettings.CreateFromNative(nativeResult));
            }
        }
        private static SecurityCredentials LoadFromPrivate(CodePackageActivationContext codePackageActivationContext, string configPackageName, string sectionName)
        {
            using (var pin = new PinCollection())
            {
                var nativeSectionName       = pin.AddBlittable(sectionName);
                var nativeConfigPackageName = pin.AddBlittable(configPackageName);
                NativeRuntime.IFabricSecurityCredentialsResult securityCredentialsResult =
                    NativeRuntime.FabricLoadSecurityCredentials(
                        codePackageActivationContext.NativeActivationContext,
                        nativeConfigPackageName,
                        nativeSectionName);

                return(SecurityCredentials.CreateFromNative(securityCredentialsResult));
            }
        }
Beispiel #8
0
 internal static extern void Urho3D_InitializeCSharp(ref ManagedRuntime managed, ref NativeRuntime native);
Beispiel #9
0
 private unsafe NodeContext GetNodeContextEndWrapper(NativeCommon.IFabricAsyncOperationContext context)
 {
     NativeRuntime.IFabricNodeContextResult2 nodeContextResult = NativeRuntime.FabricEndGetNodeContext(context);
     return(NodeContext.CreateFromNative(nodeContextResult));
 }
Beispiel #10
0
 private unsafe NodeContext GetNodeContextHelper()
 {
     NativeRuntime.IFabricNodeContextResult2 nodeContextResult = NativeRuntime.FabricGetNodeContext();
     return(NodeContext.CreateFromNative(nodeContextResult));
 }
Beispiel #11
0
 private CodePackageActivationContext GetCodePackageActivationContextEndWrapper(NativeCommon.IFabricAsyncOperationContext context)
 {
     return(CodePackageActivationContext.CreateFromNative(NativeRuntime.FabricEndGetActivationContext(context)));
 }
Beispiel #12
0
            private CodePackageActivationContext GetCodePackageActivationContextHelper()
            {
                Guid iid = typeof(NativeRuntime.IFabricCodePackageActivationContext6).GetTypeInfo().GUID;

                return(CodePackageActivationContext.CreateFromNative(NativeRuntime.FabricGetActivationContext(ref iid)));
            }
Beispiel #13
0
 private FabricRuntime InitializeFabricRuntimeEndWrapper(FabricRuntime runtime, NativeCommon.IFabricAsyncOperationContext context)
 {
     runtime.nativeRuntime = NativeRuntime.FabricEndCreateRuntime(context);
     return(runtime);
 }
Beispiel #14
0
 internal NativeHeap(NativeRuntime runtime)
 {
     Runtime = runtime;
 }