コード例 #1
0
        public void Clear()
        {
            IsCleared = true;
            DelegateManager.Clear();

            freeIntepreters.Clear();
            intepreters.Clear();
            crossAdaptors.Clear();
            valueTypeBinders.Clear();
            mapType.Clear();
            clrTypeMapping.Clear();
            mapTypeToken.Clear();
            mapMethod.Clear();
            mapString.Clear();
            redirectMap.Clear();
            fieldGetterMap.Clear();
            fieldSetterMap.Clear();
            memberwiseCloneMap.Clear();
            createDefaultInstanceMap.Clear();
            createArrayInstanceMap.Clear();
            loadedAssemblies = null;
            references.Clear();

            LoadedTypes.Clear();
            RedirectMap.Clear();
            FieldGetterMap.Clear();
            FieldSetterMap.Clear();
            MemberwiseCloneMap.Clear();
            CreateDefaultInstanceMap.Clear();
            CreateArrayInstanceMap.Clear();
            CrossBindingAdaptors.Clear();
            ValueTypeBinders.Clear();
            Intepreters.Clear();
            FreeIntepreters.Clear();
        }
コード例 #2
0
        public AppDomain()
        {
            loadedAssemblies = System.AppDomain.CurrentDomain.GetAssemblies();
            var mi = typeof(System.Runtime.CompilerServices.RuntimeHelpers).GetMethod("InitializeArray");

            RegisterCLRMethodRedirection(mi, CLRRedirections.InitializeArray);
            foreach (var i in typeof(System.Activator).GetMethods())
            {
                if (i.Name == "CreateInstance" && i.IsGenericMethodDefinition)
                {
                    RegisterCLRMethodRedirection(i, CLRRedirections.CreateInstance);
                }
            }
            foreach (var i in typeof(System.Delegate).GetMethods())
            {
                if (i.Name == "Combine" && i.GetParameters().Length == 2)
                {
                    RegisterCLRMethodRedirection(i, CLRRedirections.DelegateCombine);
                }
                if (i.Name == "Remove")
                {
                    RegisterCLRMethodRedirection(i, CLRRedirections.DelegateRemove);
                }
                if (i.Name == "op_Equality")
                {
                    RegisterCLRMethodRedirection(i, CLRRedirections.DelegateEqulity);
                }
                if (i.Name == "op_Inequality")
                {
                    RegisterCLRMethodRedirection(i, CLRRedirections.DelegateInequlity);
                }
            }
            foreach (var i in typeof(MethodBase).GetMethods())
            {
                if (i.Name == "Invoke" && i.GetParameters().Length == 2)
                {
                    RegisterCLRMethodRedirection(i, CLRRedirections.MethodInfoInvoke);
                }
            }
            mi = typeof(System.Type).GetMethod("GetTypeFromHandle");
            RegisterCLRMethodRedirection(mi, CLRRedirections.GetTypeFromHandle);
            mi = typeof(object).GetMethod("GetType");
            RegisterCLRMethodRedirection(mi, CLRRedirections.ObjectGetType);
            dMgr = new DelegateManager(this);
            dMgr.RegisterDelegateConvertor <Action>((dele) =>
            {
                return(dele);
            });

            RegisterCrossBindingAdaptor(new Adaptors.AttributeAdaptor());

            debugService = new Debugger.DebugService(this);
        }
コード例 #3
0
ファイル: DllManager.cs プロジェクト: VSWORK-admin/vsvrsdk
 private static void RegisterVRFunction(ILRuntime.Runtime.Enviorment.DelegateManager delegateManager)
 {
     delegateManager.RegisterMethodDelegate <string, float, Vector2>();
     delegateManager.RegisterMethodDelegate <string, GameObject>();
     delegateManager.RegisterMethodDelegate <string, string, string>();
     //delegateManager.RegisterMethodDelegate<string>();
     delegateManager.RegisterMethodDelegate <WsPlaceMarkList>();
     //delegateManager.RegisterMethodDelegate<bool>();
     delegateManager.RegisterMethodDelegate <GameObject>();
     delegateManager.RegisterMethodDelegate <Texture2D>();
     delegateManager.RegisterMethodDelegate <GameObject, List <string> >();
     //delegateManager.RegisterMethodDelegate<KodFileResult>();
     delegateManager.RegisterMethodDelegate <bool, VRWsRemoteScene>();
     delegateManager.RegisterMethodDelegate <VRWsRemoteScene>();
     delegateManager.RegisterMethodDelegate <WsProgressInfo>();
     delegateManager.RegisterMethodDelegate <string, Texture2D>();
     delegateManager.RegisterMethodDelegate <Texture>();
     delegateManager.RegisterMethodDelegate <WsChangeInfo>();
     delegateManager.RegisterMethodDelegate <WsCChangeInfo>();
     delegateManager.RegisterMethodDelegate <VRChanelRoom>();
 }