コード例 #1
0
 public static void RegisterActivatedServiceType(ActivatedServiceTypeEntry entry)
 {
     lock (channelTemplates)
     {
         activatedServiceEntries.Add(entry.ObjectType, entry);
     }
 }
コード例 #2
0
 public static void RegisterActivatedServiceType(ActivatedServiceTypeEntry entry)
 {
     RemotingConfigHandler.RegisterActivatedServiceType(entry);
     if (!RemotingConfiguration.s_ListeningForActivationRequests)
     {
         RemotingConfiguration.s_ListeningForActivationRequests = true;
         ActivationServices.StartListeningForRemoteRequests();
     }
 }
コード例 #3
0
 public static ActivatedServiceTypeEntry[] GetRegisteredActivatedServiceTypes()
 {
     lock (channelTemplates)
     {
         ActivatedServiceTypeEntry[] entries = new ActivatedServiceTypeEntry[activatedServiceEntries.Count];
         activatedServiceEntries.Values.CopyTo(entries, 0);
         return(entries);
     }
 }
コード例 #4
0
        /// <summary>Registers an object type recorded in the provided <see cref="T:System.Runtime.Remoting.ActivatedServiceTypeEntry" /> on the service end as one that can be activated on request from a client.</summary>
        /// <param name="entry">Configuration settings for the client-activated type. </param>
        /// <exception cref="T:System.Security.SecurityException">At least one of the callers higher in the callstack does not have permission to configure remoting types and channels. </exception>
        /// <PermissionSet>
        ///   <IPermission class="System.Security.Permissions.ReflectionPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="MemberAccess" />
        ///   <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="RemotingConfiguration" />
        /// </PermissionSet>
        public static void RegisterActivatedServiceType(ActivatedServiceTypeEntry entry)
        {
            Hashtable obj = RemotingConfiguration.channelTemplates;

            lock (obj)
            {
                RemotingConfiguration.activatedServiceEntries.Add(entry.ObjectType, entry);
            }
        }
コード例 #5
0
            internal ActivatedServiceTypeEntry[] GetRegisteredActivatedServiceTypes()
            {
                ActivatedServiceTypeEntry[] entryArray = new ActivatedServiceTypeEntry[this._exportableClasses.Count];
                int num = 0;

                foreach (DictionaryEntry entry in this._exportableClasses)
                {
                    entryArray[num++] = (ActivatedServiceTypeEntry)entry.Value;
                }
                return(entryArray);
            }
コード例 #6
0
 internal void StoreActivatedExports(RemotingXmlConfigFileData configData)
 {
     foreach (RemotingXmlConfigFileData.TypeEntry entry in configData.ServerActivatedEntries)
     {
         ActivatedServiceTypeEntry entry2 = new ActivatedServiceTypeEntry(entry.TypeName, entry.AssemblyName)
         {
             ContextAttributes = CreateContextAttributesFromConfigEntries(entry.ContextAttributes)
         };
         RemotingConfiguration.RegisterActivatedServiceType(entry2);
     }
 }
コード例 #7
0
        public static void RegisterActivatedServiceType(ActivatedServiceTypeEntry entry)
        {
            RemotingConfigHandler.RegisterActivatedServiceType(entry);

            // make sure we're listening for activation requests
            //  (all registrations for activated service types will come through here)
            if (!s_ListeningForActivationRequests)
            {
                s_ListeningForActivationRequests = true;
                ActivationServices.StartListeningForRemoteRequests();
            }
        } // RegisterActivatedServiceType
コード例 #8
0
        /// <summary>Retrieves an array of object types registered on the service end that can be activated on request from a client.</summary>
        /// <returns>An array of object types registered on the service end that can be activated on request from a client.</returns>
        /// <exception cref="T:System.Security.SecurityException">At least one of the callers higher in the callstack does not have permission to configure remoting types and channels. </exception>
        /// <PermissionSet>
        ///   <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="RemotingConfiguration" />
        /// </PermissionSet>
        public static ActivatedServiceTypeEntry[] GetRegisteredActivatedServiceTypes()
        {
            Hashtable obj = RemotingConfiguration.channelTemplates;

            ActivatedServiceTypeEntry[] result;
            lock (obj)
            {
                ActivatedServiceTypeEntry[] array = new ActivatedServiceTypeEntry[RemotingConfiguration.activatedServiceEntries.Count];
                RemotingConfiguration.activatedServiceEntries.Values.CopyTo(array, 0);
                result = array;
            }
            return(result);
        }
コード例 #9
0
 // Register a service type that can be activated by a remote client.
 public static void RegisterActivatedServiceType
     (ActivatedServiceTypeEntry entry)
 {
     if (entry == null)
     {
         throw new ArgumentNullException("entry");
     }
     lock (typeof(RemotingConfiguration))
     {
         EnsureLoaded();
         if (activatedServiceTypes == null)
         {
             activatedServiceTypes = new Hashtable();
         }
         activatedServiceTypes[entry.ObjectType] = entry;
     }
 }
コード例 #10
0
            internal void AddActivatedType(string typeName, string assemblyName, IContextAttribute[] contextAttributes)
            {
                if (typeName == null)
                {
                    throw new ArgumentNullException("typeName");
                }
                if (assemblyName == null)
                {
                    throw new ArgumentNullException("assemblyName");
                }
                if (this.CheckForRedirectedClientType(typeName, assemblyName))
                {
                    throw new RemotingException(string.Format(CultureInfo.CurrentCulture, Environment.GetResourceString("Remoting_Config_CantUseRedirectedTypeForWellKnownService"), new object[] { typeName, assemblyName }));
                }
                ActivatedServiceTypeEntry entry = new ActivatedServiceTypeEntry(typeName, assemblyName)
                {
                    ContextAttributes = contextAttributes
                };
                string key = this.EncodeTypeAndAssemblyNames(typeName, assemblyName);

                this._exportableClasses.Add(key, entry);
            }
コード例 #11
0
	// Register a service type that can be activated by a remote client.
	public static void RegisterActivatedServiceType
				(ActivatedServiceTypeEntry entry)
			{
				if(entry == null)
				{
					throw new ArgumentNullException("entry");
				}
				lock(typeof(RemotingConfiguration))
				{
					EnsureLoaded();
					if(activatedServiceTypes == null)
					{
						activatedServiceTypes = new Hashtable();
					}
					activatedServiceTypes[entry.ObjectType] = entry;
				}
			}
コード例 #12
0
        public static void RegisterActivatedServiceType(Type type)
        {
            ActivatedServiceTypeEntry entry = new ActivatedServiceTypeEntry(type);

            RemotingConfiguration.RegisterActivatedServiceType(entry);
        }
コード例 #13
0
		public static void RegisterActivatedServiceType (ActivatedServiceTypeEntry entry) 
		{
			lock (channelTemplates)
			{
				activatedServiceEntries.Add (entry.ObjectType, entry);
			}
		}
コード例 #14
0
		public static ActivatedServiceTypeEntry[] GetRegisteredActivatedServiceTypes () 
		{
			lock (channelTemplates)
			{
				ActivatedServiceTypeEntry[] entries = new ActivatedServiceTypeEntry[activatedServiceEntries.Count];
				activatedServiceEntries.Values.CopyTo (entries,0);
				return entries;
			}
		}
 public static void RegisterActivatedServiceType(ActivatedServiceTypeEntry entry)
 {
     Contract.Requires(entry != null);
 }
コード例 #16
0
        public static void RegisterActivatedServiceType(Type type)
        {
            ActivatedServiceTypeEntry entry = new ActivatedServiceTypeEntry(type);

            RegisterActivatedServiceType(entry);
        }
コード例 #17
0
ファイル: configuration.cs プロジェクト: REALTOBIZ/mono
 // helper for Configuration::RegisterActivatedServiceType
 internal static void RegisterActivatedServiceType(ActivatedServiceTypeEntry entry)
 {   
     Info.AddActivatedType(entry.TypeName, entry.AssemblyName, 
                           entry.ContextAttributes);
 } // RegisterActivatedServiceType
コード例 #18
0
ファイル: configuration.cs プロジェクト: REALTOBIZ/mono
            //
            // helper functions to retrieve registered types
            //


            internal ActivatedServiceTypeEntry[] GetRegisteredActivatedServiceTypes()
            {
                ActivatedServiceTypeEntry[] entries =
                    new ActivatedServiceTypeEntry[_exportableClasses.Count];

                int co = 0;
                foreach (DictionaryEntry dictEntry in _exportableClasses)
                {
                    entries[co++] = (ActivatedServiceTypeEntry)dictEntry.Value;
                }
                    
                return entries;
            } // GetRegisteredActivatedServiceTypes
コード例 #19
0
 public static void RegisterActivatedServiceType(Type type)
 {
     ActivatedServiceTypeEntry entry = new ActivatedServiceTypeEntry(type);
     RemotingConfiguration.RegisterActivatedServiceType(entry);
 } // RegisterActivatedServiceType
 public static void RegisterActivatedServiceType(Type type)
 {
     ActivatedServiceTypeEntry entry = new ActivatedServiceTypeEntry(type);
     RegisterActivatedServiceType(entry);
 }
 public static void RegisterActivatedServiceType(ActivatedServiceTypeEntry entry)
 {
     RemotingConfigHandler.RegisterActivatedServiceType(entry);
     if (!s_ListeningForActivationRequests)
     {
         s_ListeningForActivationRequests = true;
         ActivationServices.StartListeningForRemoteRequests();
     }
 }
 internal void AddActivatedType(string typeName, string assemblyName, IContextAttribute[] contextAttributes)
 {
     if (typeName == null)
     {
         throw new ArgumentNullException("typeName");
     }
     if (assemblyName == null)
     {
         throw new ArgumentNullException("assemblyName");
     }
     if (this.CheckForRedirectedClientType(typeName, assemblyName))
     {
         throw new RemotingException(string.Format(CultureInfo.CurrentCulture, Environment.GetResourceString("Remoting_Config_CantUseRedirectedTypeForWellKnownService"), new object[] { typeName, assemblyName }));
     }
     ActivatedServiceTypeEntry entry = new ActivatedServiceTypeEntry(typeName, assemblyName) {
         ContextAttributes = contextAttributes
     };
     string key = this.EncodeTypeAndAssemblyNames(typeName, assemblyName);
     this._exportableClasses.Add(key, entry);
 }
コード例 #23
0
 internal static void RegisterActivatedServiceType(ActivatedServiceTypeEntry entry)
 {
     Info.AddActivatedType(entry.TypeName, entry.AssemblyName, entry.ContextAttributes);
 }
コード例 #24
0
        public static void RegisterActivatedServiceType(ActivatedServiceTypeEntry entry)
        {
            RemotingConfigHandler.RegisterActivatedServiceType(entry);

            // make sure we're listening for activation requests
            //  (all registrations for activated service types will come through here)
            if (!s_ListeningForActivationRequests)
            {
                s_ListeningForActivationRequests = true;
                ActivationServices.StartListeningForRemoteRequests();
            }
        } // RegisterActivatedServiceType
 internal ActivatedServiceTypeEntry[] GetRegisteredActivatedServiceTypes()
 {
     ActivatedServiceTypeEntry[] entryArray = new ActivatedServiceTypeEntry[this._exportableClasses.Count];
     int num = 0;
     foreach (DictionaryEntry entry in this._exportableClasses)
     {
         entryArray[num++] = (ActivatedServiceTypeEntry) entry.Value;
     }
     return entryArray;
 }
コード例 #26
0
ファイル: configuration.cs プロジェクト: REALTOBIZ/mono
            } // GetRegisteredWellKnownClientTypes


            //
            // end of helper functions to retrieve registered types
            //

            internal void AddActivatedType(String typeName, String assemblyName,
                                           IContextAttribute[] contextAttributes)
            {
                if (typeName == null)
                    throw new ArgumentNullException("typeName");
                if (assemblyName == null)
                    throw new ArgumentNullException("assemblyName");
                Contract.EndContractBlock();

                if (CheckForRedirectedClientType(typeName, assemblyName))
                {
                    throw new RemotingException(
                        String.Format(
                            CultureInfo.CurrentCulture, Environment.GetResourceString(
                                "Remoting_Config_CantUseRedirectedTypeForWellKnownService"),
                            typeName, assemblyName));
                }                                

                ActivatedServiceTypeEntry aste =  
                    new ActivatedServiceTypeEntry(typeName, assemblyName);
                aste.ContextAttributes = contextAttributes;
            
                //   The assembly name is stored in lowercase to let it be case-insensitive.
                String key = EncodeTypeAndAssemblyNames(typeName, assemblyName);
                _exportableClasses.Add(key, aste);
            } // AddActivatedType
 public static void RegisterActivatedServiceType(ActivatedServiceTypeEntry entry)
 {
   Contract.Requires(entry != null);
 }
コード例 #28
0
ファイル: configuration.cs プロジェクト: REALTOBIZ/mono
            //
            // XML Configuration Helper Functions
            //

            internal void StoreActivatedExports(RemotingXmlConfigFileData configData)
            {
                foreach (RemotingXmlConfigFileData.TypeEntry entry in configData.ServerActivatedEntries)
                {
                    ActivatedServiceTypeEntry aste =
                        new ActivatedServiceTypeEntry(entry.TypeName, entry.AssemblyName);
                    aste.ContextAttributes = 
                        CreateContextAttributesFromConfigEntries(entry.ContextAttributes);
                
                    RemotingConfiguration.RegisterActivatedServiceType(aste);
                }
            } // StoreActivatedExports
コード例 #29
0
 public static void RegisterActivatedServiceType(ActivatedServiceTypeEntry entry)
 {
     throw new NotImplementedException();
 }