Exemplo n.º 1
0
 public RuntimePropertyInfo(Property property, RuntimeType declaringType, RuntimeMethodInfo getMethod, RuntimeMethodInfo setMethod)
 {
     _property = property;
     _declaringType = declaringType;
     _getMethod = getMethod;
     _setMethod = setMethod;
 }
Exemplo n.º 2
0
        [System.Security.SecurityCritical]  // auto-generated
        internal static bool IsActivationAllowed(RuntimeType svrType)
        {
            if (svrType == null)
                return false;

            RemotingTypeCachedData cache = (RemotingTypeCachedData)
                InternalRemotingServices.GetReflectionCachedData(svrType);
        
            String assemblyName = cache.SimpleAssemblyName;

            return Info.ActivationAllowed(svrType.FullName, assemblyName);
        } // IsActivationAllowed
Exemplo n.º 3
0
 [System.Security.SecurityCritical]  // auto-generated
 internal static WellKnownClientTypeEntry IsWellKnownClientType(RuntimeType svrType)
 {
     RemotingTypeCachedData cache = (RemotingTypeCachedData)
         InternalRemotingServices.GetReflectionCachedData(svrType);
 
     String assemblyName = cache.SimpleAssemblyName;
     WellKnownClientTypeEntry wke = Info.QueryConnect(svrType.FullName, assemblyName);
     if (wke == null)
     {
         wke= Info.QueryConnect(svrType.Name, assemblyName);
     }
     return wke;
 }
Exemplo n.º 4
0
        [System.Security.SecurityCritical]  // auto-generated
        internal static ActivatedClientTypeEntry IsRemotelyActivatedClientType(RuntimeType svrType)
        {
            RemotingTypeCachedData cache = (RemotingTypeCachedData)
                InternalRemotingServices.GetReflectionCachedData(svrType);
        
            String assemblyName = cache.SimpleAssemblyName;
            ActivatedClientTypeEntry entry = Info.QueryRemoteActivate(svrType.FullName, assemblyName);

            if (entry == null)
            {
                // If not found try with the full assembly name
                String fullAssemblyName = cache.AssemblyName;
                entry = Info.QueryRemoteActivate(svrType.FullName, fullAssemblyName);
                if (entry == null){
                    // If still not found try with partial type name (without namespace)
                    entry = Info.QueryRemoteActivate(svrType.Name, assemblyName);
                }
            }
            return entry;
        } // IsRemotelyActivatedClientType
Exemplo n.º 5
0
 public static object CreateInstance(RuntimeType type)
 {
     return CreateInstance(((VTable)type.TypeHandle).Class);
 }
        private String _simpleAssemblyName; // (no strong name, version, etc.)


        internal RemotingTypeCachedData(RuntimeType ri)
        {
            RI = ri;
        }
Exemplo n.º 7
0
        // TODO: This method is not code generated correctly
        // root cause is likely the conditional expression
        // the arguments to RuntimeType::.ctor are reversed!
        private static RuntimeType BrokenGetTypeFromClass(Class klass)
        {
            // check cache. if not there, create the runtime type and save to cache
            if (!_runtimeTypeCache.ContainsKey(klass))
            {
                RuntimeType runtimeType = new RuntimeType(klass, klass.DeclaringClass != null ? GetTypeFromClass(klass.DeclaringClass) : null);
                _runtimeTypeCache[klass] = runtimeType;
            }

            return _runtimeTypeCache[klass];
        }
Exemplo n.º 8
0
        private static RuntimeType GetTypeFromClass(Class klass)
        {
            // check cache. if not there, create the runtime type and save to cache
            if (!_runtimeTypeCache.ContainsKey(klass))
            {
                RuntimeType declaringType;
                if (klass.DeclaringClass != null)
                {
                    declaringType = GetTypeFromClass(klass.DeclaringClass);
                }
                else
                {
                    declaringType = null;
                }
                RuntimeType runtimeType = new RuntimeType(klass, declaringType);
                _runtimeTypeCache[klass] = runtimeType;
            }

            return _runtimeTypeCache[klass];
        }
Exemplo n.º 9
0
 public RuntimeMethodInfo(Method method, RuntimeType declaringType)
 {
     _method = method;
     _declaringType = declaringType;
 }
Exemplo n.º 10
0
        // TODO: This method breaks XaeiO.Compiler2
        private static RuntimeType BrokenGetType(object obj)
        {
            XaeiOSObject xaeiOSObject = var.Cast<object>(obj).Cast<XaeiOSObject>();
            Class klass = xaeiOSObject.VTable.Class;

            // check cache
            if(_runtimeTypeCache.ContainsKey(klass))
            {
                return _runtimeTypeCache[klass];
            }

            RuntimeType runtimeType = new RuntimeType(klass, null);
            _runtimeTypeCache[klass] = runtimeType;

            return runtimeType;
        }
Exemplo n.º 11
0
 public RuntimeConstructorInfo(Constructor constructor, RuntimeType declaringType)
 {
     _constructor = constructor;
     _declaringType = declaringType;
 }
Exemplo n.º 12
0
 internal MarshalByRefObject CreateInstanceInternal(RuntimeType serverType)
 { 
     return ActivationServices.CreateInstance(serverType);
 }
Exemplo n.º 13
0
		internal static bool ProxyCheckCast (RealProxy rp, RuntimeType castType)
		{
			// TODO: What should it do?
			return true;
		}
Exemplo n.º 14
0
 public RuntimeType(Class klass, RuntimeType declaringType)
     : base((RuntimeTypeHandle)klass.VTable)
 {
     _class = klass;
 }
Exemplo n.º 15
0
        private String _simpleAssemblyName; // (no strong name, version, etc.)
 

        internal RemotingTypeCachedData(RuntimeType ri) : base(ri)
        {
        }