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
- EntitySet.cs
- CompositeScriptReference.cs
- WebOperationContext.cs
- CodeEventReferenceExpression.cs
- NTAccount.cs
- TemplateContent.cs
- SmtpException.cs
- DbProviderFactories.cs
- PathGeometry.cs
- AnimatedTypeHelpers.cs
- QilGeneratorEnv.cs
- SynchronizedDispatch.cs
- SmtpSpecifiedPickupDirectoryElement.cs
- SchemaRegistration.cs
- DataGridViewCellCancelEventArgs.cs
- SqlRecordBuffer.cs
- RuleSetReference.cs
- SiteMapDataSource.cs
- MemoryMappedViewStream.cs
- LocalizationComments.cs
- GridViewColumnHeaderAutomationPeer.cs
- SegmentInfo.cs
- Timer.cs
- HyperlinkAutomationPeer.cs
- CredentialSelector.cs
- WebControl.cs
- NetNamedPipeSecurityMode.cs
- Vector3DAnimationUsingKeyFrames.cs
- WebPartTransformerAttribute.cs
- InputBinding.cs
- WCFServiceClientProxyGenerator.cs
- ImageButton.cs
- CodeExporter.cs
- SystemIPInterfaceStatistics.cs
- DynamicUpdateCommand.cs
- codemethodreferenceexpression.cs
- DesignerActionListCollection.cs
- RuntimeComponentFilter.cs
- Utility.cs
- InstanceValue.cs
- PackageRelationship.cs
- DataGridPagingPage.cs
- XmlDataSource.cs
- PeerNearMe.cs
- ScriptControlManager.cs
- TraceSection.cs
- AccessDataSourceView.cs
- ConditionalDesigner.cs
- SoapMessage.cs
- PriorityBinding.cs
- File.cs
- DoubleLinkList.cs
- PackagingUtilities.cs
- HtmlInputHidden.cs
- WebPartManagerInternals.cs
- AppSettingsExpressionBuilder.cs
- ActivityMarkupSerializationProvider.cs
- BufferedWebEventProvider.cs
- Tuple.cs
- Graphics.cs
- RectIndependentAnimationStorage.cs
- IList.cs
- BinaryOperationBinder.cs
- TextEditorDragDrop.cs
- ToolZone.cs
- ZipIOExtraFieldZip64Element.cs
- OracleMonthSpan.cs
- SharedPersonalizationStateInfo.cs
- WebPartConnectionsConfigureVerb.cs
- Zone.cs
- DataList.cs
- BridgeDataReader.cs
- AnonymousIdentificationSection.cs
- StsCommunicationException.cs
- MobileControlDesigner.cs
- PromptBuilder.cs
- ProfileGroupSettings.cs
- Debug.cs
- BamlTreeMap.cs
- PriorityBindingExpression.cs
- WindowsFormsSynchronizationContext.cs
- SoapSchemaImporter.cs
- IPGlobalProperties.cs
- SessionStateModule.cs
- NetworkInterface.cs
- ScriptManagerProxy.cs
- SqlUDTStorage.cs
- Stylus.cs
- DomainConstraint.cs
- Win32.cs
- EventMap.cs
- DataGridViewCellCollection.cs
- LocalizationParserHooks.cs
- DeploymentSection.cs
- WindowsToolbar.cs
- BitmapEffectInputData.cs
- WizardSideBarListControlItem.cs
- SystemUnicastIPAddressInformation.cs
- TransactionInterop.cs
- DocumentApplicationJournalEntry.cs