Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / clr / src / BCL / System / Security / Policy / ApplicationDirectory.cs / 1305376 / ApplicationDirectory.cs
// ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== // ApplicationDirectory.cs // //[....] // // ApplicationDirectory is an evidence type representing the directory the assembly // was loaded from. // namespace System.Security.Policy { using System; using System.IO; using System.Security.Util; using System.Collections; using System.Diagnostics.Contracts; [Serializable] [System.Runtime.InteropServices.ComVisible(true)] public sealed class ApplicationDirectory : EvidenceBase { private URLString m_appDirectory; public ApplicationDirectory( String name ) { if (name == null) throw new ArgumentNullException( "name" ); Contract.EndContractBlock(); m_appDirectory = new URLString( name ); } private ApplicationDirectory(URLString appDirectory) { Contract.Assert(appDirectory != null); m_appDirectory = appDirectory; } public String Directory { get { return m_appDirectory.ToString(); } } public override bool Equals(Object o) { ApplicationDirectory other = o as ApplicationDirectory; if (other == null) { return false; } return m_appDirectory.Equals(other.m_appDirectory); } public override int GetHashCode() { return this.m_appDirectory.GetHashCode(); } public override EvidenceBase Clone() { return new ApplicationDirectory(m_appDirectory); } public Object Copy() { return Clone(); } internal SecurityElement ToXml() { SecurityElement root = new SecurityElement( "System.Security.Policy.ApplicationDirectory" ); // If you hit this assert then most likely you are trying to change the name of this class. // This is ok as long as you change the hard coded string above and change the assert below. Contract.Assert( this.GetType().FullName.Equals( "System.Security.Policy.ApplicationDirectory" ), "Class name changed!" ); root.AddAttribute( "version", "1" ); if (m_appDirectory != null) root.AddChild( new SecurityElement( "Directory", m_appDirectory.ToString() ) ); return root; } public override String ToString() { return ToXml().ToString(); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== // ApplicationDirectory.cs // //[....] // // ApplicationDirectory is an evidence type representing the directory the assembly // was loaded from. // namespace System.Security.Policy { using System; using System.IO; using System.Security.Util; using System.Collections; using System.Diagnostics.Contracts; [Serializable] [System.Runtime.InteropServices.ComVisible(true)] public sealed class ApplicationDirectory : EvidenceBase { private URLString m_appDirectory; public ApplicationDirectory( String name ) { if (name == null) throw new ArgumentNullException( "name" ); Contract.EndContractBlock(); m_appDirectory = new URLString( name ); } private ApplicationDirectory(URLString appDirectory) { Contract.Assert(appDirectory != null); m_appDirectory = appDirectory; } public String Directory { get { return m_appDirectory.ToString(); } } public override bool Equals(Object o) { ApplicationDirectory other = o as ApplicationDirectory; if (other == null) { return false; } return m_appDirectory.Equals(other.m_appDirectory); } public override int GetHashCode() { return this.m_appDirectory.GetHashCode(); } public override EvidenceBase Clone() { return new ApplicationDirectory(m_appDirectory); } public Object Copy() { return Clone(); } internal SecurityElement ToXml() { SecurityElement root = new SecurityElement( "System.Security.Policy.ApplicationDirectory" ); // If you hit this assert then most likely you are trying to change the name of this class. // This is ok as long as you change the hard coded string above and change the assert below. Contract.Assert( this.GetType().FullName.Equals( "System.Security.Policy.ApplicationDirectory" ), "Class name changed!" ); root.AddAttribute( "version", "1" ); if (m_appDirectory != null) root.AddChild( new SecurityElement( "Directory", m_appDirectory.ToString() ) ); return root; } public override String ToString() { return ToXml().ToString(); } } } // 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
- WorkflowView.cs
- PathGradientBrush.cs
- ValidatedControlConverter.cs
- COM2ExtendedTypeConverter.cs
- UnsignedPublishLicense.cs
- ControllableStoryboardAction.cs
- SqlXml.cs
- DesignerSerializationOptionsAttribute.cs
- DataGridDefaultColumnWidthTypeConverter.cs
- OracleCommandSet.cs
- DomainConstraint.cs
- SecurityResources.cs
- Transform3DGroup.cs
- EncryptedKey.cs
- DataGridViewRowPrePaintEventArgs.cs
- WSFederationHttpBinding.cs
- DataGridLinkButton.cs
- DataControlCommands.cs
- ContainsSearchOperator.cs
- SubclassTypeValidator.cs
- IndependentlyAnimatedPropertyMetadata.cs
- AutomationAttributeInfo.cs
- SecurityIdentifierElement.cs
- GiveFeedbackEvent.cs
- WebBaseEventKeyComparer.cs
- ProcessHostConfigUtils.cs
- ComIntegrationManifestGenerator.cs
- Monitor.cs
- DbConnectionInternal.cs
- CachedCompositeFamily.cs
- ScrollProperties.cs
- DataTable.cs
- SqlDataSourceSelectingEventArgs.cs
- PropertyKey.cs
- SupportsEventValidationAttribute.cs
- ScaleTransform.cs
- Keywords.cs
- SoapExtensionImporter.cs
- InfocardClientCredentials.cs
- CodeMemberEvent.cs
- TextEditorLists.cs
- HtmlLink.cs
- OrderedHashRepartitionEnumerator.cs
- WebPartManager.cs
- Column.cs
- HtmlHistory.cs
- PixelFormatConverter.cs
- WorkflowInstanceRecord.cs
- OdbcCommandBuilder.cs
- SamlAssertionKeyIdentifierClause.cs
- RemoteX509AsymmetricSecurityKey.cs
- CodeLinePragma.cs
- XamlDesignerSerializationManager.cs
- Dispatcher.cs
- DiscoveryRequestHandler.cs
- DBConnection.cs
- KoreanLunisolarCalendar.cs
- CodeIdentifier.cs
- LambdaCompiler.ControlFlow.cs
- DocumentOrderQuery.cs
- TextEndOfLine.cs
- WrappedOptions.cs
- CodeSubDirectoriesCollection.cs
- DataSourceSelectArguments.cs
- ProtocolsSection.cs
- DescendentsWalkerBase.cs
- ReturnValue.cs
- MasterPageBuildProvider.cs
- TypeConverter.cs
- LocatorPartList.cs
- CompatibleIComparer.cs
- CqlParser.cs
- UrlMapping.cs
- HttpModule.cs
- KnownBoxes.cs
- MessageFilter.cs
- XamlParser.cs
- SimpleLine.cs
- SizeAnimationClockResource.cs
- OutKeywords.cs
- ContextMenuStripGroup.cs
- SchemaNamespaceManager.cs
- TrackingProfileDeserializationException.cs
- TextChangedEventArgs.cs
- ValuePattern.cs
- Size.cs
- SafeFileHandle.cs
- StorageMappingItemCollection.cs
- CustomUserNameSecurityTokenAuthenticator.cs
- AttributeData.cs
- AsymmetricAlgorithm.cs
- BasicViewGenerator.cs
- XmlDownloadManager.cs
- TableSectionStyle.cs
- HttpListenerRequest.cs
- SkewTransform.cs
- StructuredTypeEmitter.cs
- loginstatus.cs
- ToolStripLocationCancelEventArgs.cs
- PseudoWebRequest.cs