Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / clr / src / BCL / System / Runtime / Remoting / URLAttribute.cs / 1305376 / URLAttribute.cs
// ==++==
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// ==--==
/*============================================================
**
** File: UrlAttribute.cs
**
** Author: Tarun Anand ([....])
**
** Purpose: Defines an attribute which can be used at the callsite to
** specify the URL at which the activation will happen.
**
** Date: [....] 30, 2000
**
===========================================================*/
namespace System.Runtime.Remoting.Activation {
using System.Runtime.Remoting;
using System.Runtime.Remoting.Contexts;
using System.Runtime.Remoting.Messaging;
using System.Security.Permissions;
using System;
[System.Security.SecurityCritical] // auto-generated
[Serializable]
[System.Runtime.InteropServices.ComVisible(true)]
public sealed class UrlAttribute : ContextAttribute
{
private String url;
private static String propertyName = "UrlAttribute";
[System.Security.SecurityCritical] // auto-generated_required
public UrlAttribute(String callsiteURL) :base(propertyName)
{
if(null == callsiteURL)
{
// Invalid arg
throw new ArgumentNullException("callsiteURL");
}
url = callsiteURL;
}
// Object::Equals
// Override the default implementation which just compares the names
[System.Security.SecuritySafeCritical] // overrides public transparent member
public override bool Equals(Object o)
{
return (o is IContextProperty) && (o is UrlAttribute) &&
(((UrlAttribute)o).UrlValue.Equals(url));
}
[System.Security.SecuritySafeCritical] // overrides public transparent member
public override int GetHashCode()
{
return this.url.GetHashCode();
}
// Override ContextAttribute's implementation of IContextAttribute::IsContextOK
[System.Security.SecurityCritical] // auto-generated_required
[System.Runtime.InteropServices.ComVisible(true)]
public override bool IsContextOK(Context ctx, IConstructionCallMessage msg)
{
return false;
}
// Override ContextAttribute's impl. of IContextAttribute::GetPropForNewCtx
[System.Security.SecurityCritical] // auto-generated_required
[System.Runtime.InteropServices.ComVisible(true)]
public override void GetPropertiesForNewContext(IConstructionCallMessage ctorMsg)
{
// We are not interested in contributing any properties to the
// new context since the only purpose of this property is to force
// the creation of the context and the server object inside it at
// the specified URL.
return;
}
public String UrlValue
{
[System.Security.SecurityCritical] // auto-generated_required
get { return url; }
}
}
} // namespace
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// ==++==
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// ==--==
/*============================================================
**
** File: UrlAttribute.cs
**
** Author: Tarun Anand ([....])
**
** Purpose: Defines an attribute which can be used at the callsite to
** specify the URL at which the activation will happen.
**
** Date: [....] 30, 2000
**
===========================================================*/
namespace System.Runtime.Remoting.Activation {
using System.Runtime.Remoting;
using System.Runtime.Remoting.Contexts;
using System.Runtime.Remoting.Messaging;
using System.Security.Permissions;
using System;
[System.Security.SecurityCritical] // auto-generated
[Serializable]
[System.Runtime.InteropServices.ComVisible(true)]
public sealed class UrlAttribute : ContextAttribute
{
private String url;
private static String propertyName = "UrlAttribute";
[System.Security.SecurityCritical] // auto-generated_required
public UrlAttribute(String callsiteURL) :base(propertyName)
{
if(null == callsiteURL)
{
// Invalid arg
throw new ArgumentNullException("callsiteURL");
}
url = callsiteURL;
}
// Object::Equals
// Override the default implementation which just compares the names
[System.Security.SecuritySafeCritical] // overrides public transparent member
public override bool Equals(Object o)
{
return (o is IContextProperty) && (o is UrlAttribute) &&
(((UrlAttribute)o).UrlValue.Equals(url));
}
[System.Security.SecuritySafeCritical] // overrides public transparent member
public override int GetHashCode()
{
return this.url.GetHashCode();
}
// Override ContextAttribute's implementation of IContextAttribute::IsContextOK
[System.Security.SecurityCritical] // auto-generated_required
[System.Runtime.InteropServices.ComVisible(true)]
public override bool IsContextOK(Context ctx, IConstructionCallMessage msg)
{
return false;
}
// Override ContextAttribute's impl. of IContextAttribute::GetPropForNewCtx
[System.Security.SecurityCritical] // auto-generated_required
[System.Runtime.InteropServices.ComVisible(true)]
public override void GetPropertiesForNewContext(IConstructionCallMessage ctorMsg)
{
// We are not interested in contributing any properties to the
// new context since the only purpose of this property is to force
// the creation of the context and the server object inside it at
// the specified URL.
return;
}
public String UrlValue
{
[System.Security.SecurityCritical] // auto-generated_required
get { return url; }
}
}
} // namespace
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- SecondaryIndexDefinition.cs
- XNameConverter.cs
- IListConverters.cs
- Encoder.cs
- PriorityQueue.cs
- IconHelper.cs
- SqlXmlStorage.cs
- XmlAttributeProperties.cs
- JavaScriptSerializer.cs
- RtfToXamlLexer.cs
- SmiEventSink_Default.cs
- RichTextBoxConstants.cs
- ReadWriteSpinLock.cs
- InitializerFacet.cs
- ElasticEase.cs
- TimeSpanStorage.cs
- MatchingStyle.cs
- XamlTypeMapper.cs
- SequentialWorkflowRootDesigner.cs
- ProgressBarHighlightConverter.cs
- CurrencyWrapper.cs
- SecurityContext.cs
- ClientTargetCollection.cs
- SponsorHelper.cs
- PerformanceCounterManager.cs
- UpdateRecord.cs
- ImageIndexConverter.cs
- WriteTimeStream.cs
- ObjectPropertyMapping.cs
- OleDbMetaDataFactory.cs
- PriorityQueue.cs
- BindingContext.cs
- ToolStripDropDownDesigner.cs
- MgmtConfigurationRecord.cs
- DataObjectMethodAttribute.cs
- XPathLexer.cs
- PropertyTab.cs
- WinEventWrap.cs
- JsonUriDataContract.cs
- MD5.cs
- OdbcConnection.cs
- TimeoutException.cs
- QualifiedCellIdBoolean.cs
- FilterableAttribute.cs
- MultiDataTrigger.cs
- EditingMode.cs
- OleDbFactory.cs
- FrameworkElementFactory.cs
- XmlCharCheckingReader.cs
- XmlSchemaGroup.cs
- Event.cs
- DispatcherOperation.cs
- ObjectDataSourceStatusEventArgs.cs
- CodeMemberMethod.cs
- SecurityImpersonationBehavior.cs
- LinqDataSourceContextEventArgs.cs
- PresentationSource.cs
- XPathNavigatorReader.cs
- SqlGenericUtil.cs
- RawUIStateInputReport.cs
- TagMapCollection.cs
- RandomNumberGenerator.cs
- ObjectAnimationBase.cs
- DescendantQuery.cs
- FormViewInsertEventArgs.cs
- CodeTypeParameterCollection.cs
- ContainsRowNumberChecker.cs
- DataTableMappingCollection.cs
- DesignerLinkAdapter.cs
- ProfilePropertySettingsCollection.cs
- DataObjectPastingEventArgs.cs
- SynchronousSendBindingElement.cs
- BulletedList.cs
- LoginName.cs
- PartialTrustHelpers.cs
- DataList.cs
- FactoryGenerator.cs
- Transaction.cs
- GeometryModel3D.cs
- QueueSurrogate.cs
- HashRepartitionEnumerator.cs
- OpacityConverter.cs
- XmlBinaryWriterSession.cs
- GlyphingCache.cs
- AbstractExpressions.cs
- Math.cs
- DragDeltaEventArgs.cs
- InputMethod.cs
- TrackingProfileCache.cs
- VarInfo.cs
- PtsHelper.cs
- ImageCodecInfo.cs
- TemplateEditingFrame.cs
- BatchWriter.cs
- InputMethod.cs
- PresentationTraceSources.cs
- ScrollItemProviderWrapper.cs
- DocumentViewerHelper.cs
- SafeRightsManagementHandle.cs
- InputLanguage.cs