public static void RegisterWellKnownServiceType(WellKnownServiceTypeEntry entry) { lock (channelTemplates) { wellKnownServiceEntries [entry.ObjectUri] = entry; RemotingServices.CreateWellKnownServerIdentity(entry.ObjectType, entry.ObjectUri, entry.Mode); } }
/// <summary>Registers an object <see cref="T:System.Type" /> recorded in the provided <see cref="T:System.Runtime.Remoting.WellKnownServiceTypeEntry" /> on the service end as a well-known type.</summary> /// <param name="entry">Configuration settings for the well-known 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.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="RemotingConfiguration" /> /// </PermissionSet> public static void RegisterWellKnownServiceType(WellKnownServiceTypeEntry entry) { Hashtable obj = RemotingConfiguration.channelTemplates; lock (obj) { RemotingConfiguration.wellKnownServiceEntries[entry.ObjectUri] = entry; RemotingServices.CreateWellKnownServerIdentity(entry.ObjectType, entry.ObjectUri, entry.Mode); } }