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
- FrameworkPropertyMetadata.cs
- SortAction.cs
- bindurihelper.cs
- UIElementParaClient.cs
- PathSegment.cs
- HttpProfileBase.cs
- IMembershipProvider.cs
- URIFormatException.cs
- OleDbPropertySetGuid.cs
- TextCollapsingProperties.cs
- Point3DKeyFrameCollection.cs
- GenerateScriptTypeAttribute.cs
- Attachment.cs
- GorillaCodec.cs
- NamespaceTable.cs
- DialogResultConverter.cs
- FormViewPageEventArgs.cs
- URIFormatException.cs
- ViewService.cs
- WpfWebRequestHelper.cs
- Timer.cs
- PerfCounters.cs
- BamlWriter.cs
- BitmapPalette.cs
- SrgsOneOf.cs
- AlphaSortedEnumConverter.cs
- RijndaelManaged.cs
- serverconfig.cs
- WindowsIdentity.cs
- Comparer.cs
- TypeHelper.cs
- SystemUdpStatistics.cs
- TextParagraphProperties.cs
- MenuItem.cs
- WsatServiceCertificate.cs
- AnchorEditor.cs
- WebServiceFaultDesigner.cs
- basenumberconverter.cs
- TextEffectResolver.cs
- PageTrueTypeFont.cs
- ByteStreamBufferedMessageData.cs
- _BufferOffsetSize.cs
- Visitors.cs
- AlphaSortedEnumConverter.cs
- ConvertEvent.cs
- CalendarModeChangedEventArgs.cs
- WebPermission.cs
- PropertyInfoSet.cs
- ListViewHitTestInfo.cs
- RuleElement.cs
- XdrBuilder.cs
- FullTextBreakpoint.cs
- UseManagedPresentationBindingElement.cs
- CursorConverter.cs
- TextEditorParagraphs.cs
- CqlLexer.cs
- XPathSelfQuery.cs
- X509ServiceCertificateAuthenticationElement.cs
- ListParagraph.cs
- LabelDesigner.cs
- XmlIlTypeHelper.cs
- Property.cs
- SynchronizedReadOnlyCollection.cs
- Message.cs
- XmlHierarchicalDataSourceView.cs
- SignatureDescription.cs
- FileResponseElement.cs
- IncrementalReadDecoders.cs
- Rotation3D.cs
- CreateUserErrorEventArgs.cs
- SHA256Managed.cs
- ActivityCodeDomSerializationManager.cs
- TypeSystem.cs
- GeneralTransform3DGroup.cs
- ReflectEventDescriptor.cs
- Int32Collection.cs
- ColorPalette.cs
- ProviderException.cs
- UrlAuthFailedErrorFormatter.cs
- SoapSchemaExporter.cs
- XmlIncludeAttribute.cs
- QueryableFilterUserControl.cs
- Setter.cs
- DataRecordInternal.cs
- UInt64Storage.cs
- DataGridAddNewRow.cs
- CodeIndexerExpression.cs
- InvokeProviderWrapper.cs
- MonthChangedEventArgs.cs
- SiteMapPathDesigner.cs
- CodeDirectoryCompiler.cs
- InvokeCompletedEventArgs.cs
- ComboBoxAutomationPeer.cs
- MetadataFile.cs
- TypeSystemProvider.cs
- CustomValidator.cs
- SiteIdentityPermission.cs
- GPStream.cs
- AvTrace.cs
- CircleHotSpot.cs