Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / ndp / clr / src / BCL / System / Security / Policy / AllMembershipCondition.cs / 1 / AllMembershipCondition.cs
// ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== // AllMembershipCondition.cs // // Simple IMembershipCondition implementation that always passes // namespace System.Security.Policy { using System; using System.Security; using System.Security.Util; using System.Security.Permissions; using System.Collections; [Serializable] [System.Runtime.InteropServices.ComVisible(true)] sealed public class AllMembershipCondition : IMembershipCondition, IConstantMembershipCondition, IReportMatchMembershipCondition { public AllMembershipCondition() { } public bool Check( Evidence evidence ) { object usedEvidence = null; return (this as IReportMatchMembershipCondition).Check(evidence, out usedEvidence); } bool IReportMatchMembershipCondition.Check(Evidence evidence, out object usedEvidence) { usedEvidence = null; return true; } public IMembershipCondition Copy() { return new AllMembershipCondition(); } public override String ToString() { return Environment.GetResourceString( "All_ToString" ); } public SecurityElement ToXml() { return ToXml( null ); } public void FromXml( SecurityElement e ) { FromXml( e, null ); } public SecurityElement ToXml( PolicyLevel level ) { SecurityElement root = new SecurityElement( "IMembershipCondition" ); System.Security.Util.XMLUtil.AddClassAttribute( root, this.GetType(), "System.Security.Policy.AllMembershipCondition" ); // 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. BCLDebug.Assert( this.GetType().FullName.Equals( "System.Security.Policy.AllMembershipCondition" ), "Class name changed!" ); root.AddAttribute( "version", "1" ); return root; } public void FromXml( SecurityElement e, PolicyLevel level ) { if (e == null) throw new ArgumentNullException("e"); if (!e.Tag.Equals( "IMembershipCondition" )) { throw new ArgumentException( Environment.GetResourceString( "Argument_MembershipConditionElement" ) ); } } public override bool Equals( Object o ) { return (o is AllMembershipCondition); } public override int GetHashCode() { return typeof( AllMembershipCondition ).GetHashCode(); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== // AllMembershipCondition.cs // // Simple IMembershipCondition implementation that always passes // namespace System.Security.Policy { using System; using System.Security; using System.Security.Util; using System.Security.Permissions; using System.Collections; [Serializable] [System.Runtime.InteropServices.ComVisible(true)] sealed public class AllMembershipCondition : IMembershipCondition, IConstantMembershipCondition, IReportMatchMembershipCondition { public AllMembershipCondition() { } public bool Check( Evidence evidence ) { object usedEvidence = null; return (this as IReportMatchMembershipCondition).Check(evidence, out usedEvidence); } bool IReportMatchMembershipCondition.Check(Evidence evidence, out object usedEvidence) { usedEvidence = null; return true; } public IMembershipCondition Copy() { return new AllMembershipCondition(); } public override String ToString() { return Environment.GetResourceString( "All_ToString" ); } public SecurityElement ToXml() { return ToXml( null ); } public void FromXml( SecurityElement e ) { FromXml( e, null ); } public SecurityElement ToXml( PolicyLevel level ) { SecurityElement root = new SecurityElement( "IMembershipCondition" ); System.Security.Util.XMLUtil.AddClassAttribute( root, this.GetType(), "System.Security.Policy.AllMembershipCondition" ); // 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. BCLDebug.Assert( this.GetType().FullName.Equals( "System.Security.Policy.AllMembershipCondition" ), "Class name changed!" ); root.AddAttribute( "version", "1" ); return root; } public void FromXml( SecurityElement e, PolicyLevel level ) { if (e == null) throw new ArgumentNullException("e"); if (!e.Tag.Equals( "IMembershipCondition" )) { throw new ArgumentException( Environment.GetResourceString( "Argument_MembershipConditionElement" ) ); } } public override bool Equals( Object o ) { return (o is AllMembershipCondition); } public override int GetHashCode() { return typeof( AllMembershipCondition ).GetHashCode(); } } } // 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
- AdPostCacheSubstitution.cs
- DrawingAttributeSerializer.cs
- DateTimeOffset.cs
- metadatamappinghashervisitor.cs
- SafeRsaProviderHandle.cs
- TableCellAutomationPeer.cs
- RegistryExceptionHelper.cs
- Trace.cs
- SpotLight.cs
- SpAudioStreamWrapper.cs
- TileModeValidation.cs
- MenuItem.cs
- SerializationIncompleteException.cs
- ListChangedEventArgs.cs
- Vector3DAnimationUsingKeyFrames.cs
- TextPattern.cs
- CuspData.cs
- HandlerWithFactory.cs
- CodeConditionStatement.cs
- Lease.cs
- AnimationLayer.cs
- String.cs
- UniqueIdentifierService.cs
- _SslSessionsCache.cs
- TrackingParameters.cs
- EnumCodeDomSerializer.cs
- Context.cs
- DataGridViewImageColumn.cs
- Evidence.cs
- RegexTree.cs
- SQLSingle.cs
- CodeAssignStatement.cs
- ChannelBase.cs
- RuntimeHelpers.cs
- ComNativeDescriptor.cs
- ObjectDataSourceFilteringEventArgs.cs
- JoinElimination.cs
- BaseParaClient.cs
- WorkflowInstanceProvider.cs
- TypeLibConverter.cs
- BinaryExpressionHelper.cs
- ResourceDefaultValueAttribute.cs
- ExtensionQuery.cs
- OpCopier.cs
- DataGridTablesFactory.cs
- RadioButtonFlatAdapter.cs
- RegexMatchCollection.cs
- SplineKeyFrames.cs
- MailAddress.cs
- Control.cs
- AtomMaterializerLog.cs
- TransformPattern.cs
- WeakEventTable.cs
- XPathNodePointer.cs
- SelectorAutomationPeer.cs
- JsonServiceDocumentSerializer.cs
- NamedPipeTransportBindingElement.cs
- DataGridCaption.cs
- InfoCardRSAPKCS1SignatureFormatter.cs
- NativeMethods.cs
- WindowsScroll.cs
- HttpFileCollection.cs
- datacache.cs
- SessionEndingEventArgs.cs
- DiffuseMaterial.cs
- BatchStream.cs
- HitTestDrawingContextWalker.cs
- XPathEmptyIterator.cs
- XmlSchemaImporter.cs
- AsymmetricAlgorithm.cs
- Point3DConverter.cs
- PresentationTraceSources.cs
- OleDbPropertySetGuid.cs
- MetadataSerializer.cs
- Line.cs
- ServiceOperation.cs
- PathFigure.cs
- ControlParser.cs
- GeneralTransform2DTo3DTo2D.cs
- DataColumnChangeEvent.cs
- Scene3D.cs
- HttpConfigurationContext.cs
- IfAction.cs
- FontEditor.cs
- TextServicesPropertyRanges.cs
- MappedMetaModel.cs
- IsolatedStorageException.cs
- WorkflowPersistenceService.cs
- Literal.cs
- SecurityRuntime.cs
- UpdatePanel.cs
- ToolStripRenderer.cs
- PagePropertiesChangingEventArgs.cs
- XmlWriter.cs
- WindowsListViewGroupHelper.cs
- CompiledRegexRunner.cs
- PenCursorManager.cs
- Point3DCollection.cs
- FusionWrap.cs
- UserValidatedEventArgs.cs