RegisterActivatedClientType() private méthode

private RegisterActivatedClientType ( ActivatedClientTypeEntry entry ) : void
entry ActivatedClientTypeEntry
Résultat void
        public static void RegisterActivatedClientType(Type type, String appUrl)
        {
            ActivatedClientTypeEntry acte =
                new ActivatedClientTypeEntry(type, appUrl);

            RemotingConfiguration.RegisterActivatedClientType(acte);
        } // RegisterActivatedClientType
 internal void StoreRemoteAppEntries(RemotingXmlConfigFileData configData)
 {
     char[] trimChars = new char[] { '/' };
     foreach (RemotingXmlConfigFileData.RemoteAppEntry entry in configData.RemoteAppEntries)
     {
         string appUri = entry.AppUri;
         if ((appUri != null) && !appUri.EndsWith("/", StringComparison.Ordinal))
         {
             appUri = appUri.TrimEnd(trimChars);
         }
         foreach (RemotingXmlConfigFileData.TypeEntry entry2 in entry.ActivatedObjects)
         {
             ActivatedClientTypeEntry entry3 = new ActivatedClientTypeEntry(entry2.TypeName, entry2.AssemblyName, appUri)
             {
                 ContextAttributes = CreateContextAttributesFromConfigEntries(entry2.ContextAttributes)
             };
             RemotingConfiguration.RegisterActivatedClientType(entry3);
         }
         foreach (RemotingXmlConfigFileData.ClientWellKnownEntry entry4 in entry.WellKnownObjects)
         {
             WellKnownClientTypeEntry entry5 = new WellKnownClientTypeEntry(entry4.TypeName, entry4.AssemblyName, entry4.Url)
             {
                 ApplicationUrl = appUri
             };
             RemotingConfiguration.RegisterWellKnownClientType(entry5);
         }
     }
 }
Exemple #3
0
 /// <summary>Registers an object <see cref="T:System.Type" /> on the client end as a type that can be activated on the server, using the given parameters to initialize a new instance of the <see cref="T:System.Runtime.Remoting.ActivatedClientTypeEntry" /> class.</summary>
 /// <param name="type">The object <see cref="T:System.Type" />. </param>
 /// <param name="appUrl">URL of the application where this type is activated. </param>
 /// <exception cref="T:System.ArgumentNullException">The <paramref name="typeName" /> or <paramref name="URI" /> parameter is null. </exception>
 /// <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 RegisterActivatedClientType(Type type, string appUrl)
 {
     if (type == null)
     {
         throw new ArgumentNullException("type");
     }
     if (appUrl == null)
     {
         throw new ArgumentNullException("appUrl");
     }
     RemotingConfiguration.RegisterActivatedClientType(new ActivatedClientTypeEntry(type, appUrl));
 }
Exemple #4
0
 internal static void RegisterTypes(ArrayList types)
 {
     foreach (object obj in types)
     {
         TypeEntry typeEntry = (TypeEntry)obj;
         if (typeEntry is ActivatedClientTypeEntry)
         {
             RemotingConfiguration.RegisterActivatedClientType((ActivatedClientTypeEntry)typeEntry);
         }
         else if (typeEntry is ActivatedServiceTypeEntry)
         {
             RemotingConfiguration.RegisterActivatedServiceType((ActivatedServiceTypeEntry)typeEntry);
         }
         else if (typeEntry is WellKnownClientTypeEntry)
         {
             RemotingConfiguration.RegisterWellKnownClientType((WellKnownClientTypeEntry)typeEntry);
         }
         else if (typeEntry is WellKnownServiceTypeEntry)
         {
             RemotingConfiguration.RegisterWellKnownServiceType((WellKnownServiceTypeEntry)typeEntry);
         }
     }
 }
Exemple #5
0
        public static void RegisterActivatedClientType(Type type, string appUrl)
        {
            ActivatedClientTypeEntry entry = new ActivatedClientTypeEntry(type, appUrl);

            RemotingConfiguration.RegisterActivatedClientType(entry);
        }