96 lines
5.5 KiB
C#
96 lines
5.5 KiB
C#
using System;
|
|
using System.Runtime.InteropServices;
|
|
using System.Runtime.Remoting.Contexts;
|
|
|
|
namespace System.Runtime.Remoting.Activation
|
|
{
|
|
/// <summary>Defines an attribute that can be used at the call site to specify the URL where the activation will happen. This class cannot be inherited.</summary>
|
|
// Token: 0x0200038D RID: 909
|
|
[ComVisible(true)]
|
|
[Serializable]
|
|
public sealed class UrlAttribute : ContextAttribute
|
|
{
|
|
/// <summary>Creates a new instance of the <see cref="T:System.Runtime.Remoting.Activation.UrlAttribute" /> class.</summary>
|
|
/// <param name="callsiteURL">The call site URL. </param>
|
|
/// <exception cref="T:System.ArgumentNullException">The <paramref name="callsiteURL" /> parameter is null. </exception>
|
|
/// <exception cref="T:System.Security.SecurityException">The immediate caller does not have infrastructure permission. </exception>
|
|
// Token: 0x06002520 RID: 9504 RVA: 0x0007B34C File Offset: 0x0007954C
|
|
public UrlAttribute(string callsiteURL)
|
|
: base(callsiteURL)
|
|
{
|
|
this.url = callsiteURL;
|
|
}
|
|
|
|
/// <summary>Gets the URL value of the <see cref="T:System.Runtime.Remoting.Activation.UrlAttribute" />.</summary>
|
|
/// <returns>The URL value of the <see cref="T:System.Runtime.Remoting.Activation.UrlAttribute" />.</returns>
|
|
/// <exception cref="T:System.Security.SecurityException">The immediate caller does not have infrastructure permission. </exception>
|
|
/// <PermissionSet>
|
|
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="Infrastructure" />
|
|
/// </PermissionSet>
|
|
// Token: 0x170006DB RID: 1755
|
|
// (get) Token: 0x06002521 RID: 9505 RVA: 0x0007B35C File Offset: 0x0007955C
|
|
public string UrlValue
|
|
{
|
|
get
|
|
{
|
|
return this.url;
|
|
}
|
|
}
|
|
|
|
/// <summary>Checks whether the specified object refers to the same URL as the current instance.</summary>
|
|
/// <returns>true if the object is a <see cref="T:System.Runtime.Remoting.Activation.UrlAttribute" /> with the same value; otherwise, false.</returns>
|
|
/// <param name="o">The object to compare to the current <see cref="T:System.Runtime.Remoting.Activation.UrlAttribute" />. </param>
|
|
/// <exception cref="T:System.Security.SecurityException">The immediate caller does not have infrastructure permission. </exception>
|
|
/// <PermissionSet>
|
|
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="Infrastructure" />
|
|
/// </PermissionSet>
|
|
// Token: 0x06002522 RID: 9506 RVA: 0x0007B364 File Offset: 0x00079564
|
|
public override bool Equals(object o)
|
|
{
|
|
return o is UrlAttribute && ((UrlAttribute)o).UrlValue == this.url;
|
|
}
|
|
|
|
/// <summary>Returns the hash value for the current <see cref="T:System.Runtime.Remoting.Activation.UrlAttribute" />.</summary>
|
|
/// <returns>The hash value for the current <see cref="T:System.Runtime.Remoting.Activation.UrlAttribute" />.</returns>
|
|
/// <exception cref="T:System.Security.SecurityException">The immediate caller does not have infrastructure permission. </exception>
|
|
/// <PermissionSet>
|
|
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="Infrastructure" />
|
|
/// </PermissionSet>
|
|
// Token: 0x06002523 RID: 9507 RVA: 0x0007B38C File Offset: 0x0007958C
|
|
public override int GetHashCode()
|
|
{
|
|
return this.url.GetHashCode();
|
|
}
|
|
|
|
/// <summary>Forces the creation of the context and the server object inside the context at the specified URL.</summary>
|
|
/// <param name="ctorMsg">The <see cref="T:System.Runtime.Remoting.Activation.IConstructionCallMessage" /> of the server object to create. </param>
|
|
/// <exception cref="T:System.Security.SecurityException">The immediate caller does not have infrastructure permission. </exception>
|
|
/// <PermissionSet>
|
|
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="Infrastructure" />
|
|
/// </PermissionSet>
|
|
// Token: 0x06002524 RID: 9508 RVA: 0x0007B39C File Offset: 0x0007959C
|
|
[ComVisible(true)]
|
|
public override void GetPropertiesForNewContext(IConstructionCallMessage ctorMsg)
|
|
{
|
|
}
|
|
|
|
/// <summary>Returns a Boolean value that indicates whether the specified <see cref="T:System.Runtime.Remoting.Contexts.Context" /> meets <see cref="T:System.Runtime.Remoting.Activation.UrlAttribute" />'s requirements.</summary>
|
|
/// <returns>true if the passed-in context is acceptable; otherwise, false.</returns>
|
|
/// <param name="ctx">The context to check against the current context attribute. </param>
|
|
/// <param name="msg">The construction call, the parameters of which need to be checked against the current context. </param>
|
|
/// <exception cref="T:System.Security.SecurityException">The immediate caller does not have infrastructure permission. </exception>
|
|
/// <PermissionSet>
|
|
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="Infrastructure" />
|
|
/// </PermissionSet>
|
|
// Token: 0x06002525 RID: 9509 RVA: 0x0007B3A0 File Offset: 0x000795A0
|
|
[ComVisible(true)]
|
|
public override bool IsContextOK(Context ctx, IConstructionCallMessage msg)
|
|
{
|
|
return true;
|
|
}
|
|
|
|
// Token: 0x04000E9D RID: 3741
|
|
private string url;
|
|
}
|
|
}
|