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
- AutomationFocusChangedEventArgs.cs
- XPathSelfQuery.cs
- ViewStateException.cs
- XPathAncestorQuery.cs
- XpsThumbnail.cs
- NotConverter.cs
- ParenthesizePropertyNameAttribute.cs
- BatchServiceHost.cs
- VersionedStream.cs
- ExtensionSurface.cs
- QueryOpeningEnumerator.cs
- XmlMemberMapping.cs
- TypeForwardedToAttribute.cs
- WindowsFormsLinkLabel.cs
- ClientTarget.cs
- RsaElement.cs
- WebPartHelpVerb.cs
- Control.cs
- HttpRawResponse.cs
- DecimalConverter.cs
- DataGridViewRowStateChangedEventArgs.cs
- LinkLabel.cs
- ScriptHandlerFactory.cs
- DynamicPropertyHolder.cs
- precedingsibling.cs
- WindowsFormsHostPropertyMap.cs
- SecurityToken.cs
- IdentityManager.cs
- SiteMapSection.cs
- NegationPusher.cs
- NativeMethods.cs
- ImageMetadata.cs
- Inflater.cs
- PTUtility.cs
- XmlSchemaSimpleContent.cs
- KnownTypeAttribute.cs
- AdornerHitTestResult.cs
- ACL.cs
- ProfileBuildProvider.cs
- RegexReplacement.cs
- IPGlobalProperties.cs
- FlowDocumentReaderAutomationPeer.cs
- SHA1.cs
- SpecialFolderEnumConverter.cs
- QueryTask.cs
- ToolStripContainer.cs
- TaskFormBase.cs
- EntityContainerAssociationSet.cs
- CustomAttributeBuilder.cs
- CodeStatementCollection.cs
- IFlowDocumentViewer.cs
- DispatcherOperation.cs
- FusionWrap.cs
- MonthCalendar.cs
- SizeAnimationUsingKeyFrames.cs
- SessionState.cs
- CodePageEncoding.cs
- NumericExpr.cs
- DefaultBindingPropertyAttribute.cs
- HttpStreamXmlDictionaryWriter.cs
- ArgumentElement.cs
- ListControlConvertEventArgs.cs
- SoapAttributeAttribute.cs
- GC.cs
- CoTaskMemHandle.cs
- ToolStripPanel.cs
- MediaContext.cs
- RegionInfo.cs
- ConfigurationSectionGroupCollection.cs
- ParseChildrenAsPropertiesAttribute.cs
- CheckPair.cs
- SortedList.cs
- DecimalStorage.cs
- DrawingState.cs
- EmissiveMaterial.cs
- Divide.cs
- WorkflowServiceBuildProvider.cs
- SqlBulkCopyColumnMappingCollection.cs
- XamlPathDataSerializer.cs
- EnumBuilder.cs
- OrderingQueryOperator.cs
- PropertyGridCommands.cs
- TypeSchema.cs
- Paragraph.cs
- FormViewInsertedEventArgs.cs
- StandardBindingOptionalReliableSessionElement.cs
- WebBrowserNavigatingEventHandler.cs
- LocalizableAttribute.cs
- Pair.cs
- CompilerLocalReference.cs
- HashMembershipCondition.cs
- ObjectConverter.cs
- TextFormatter.cs
- BuildResultCache.cs
- DataViewSetting.cs
- WebReference.cs
- SafeNativeMethodsMilCoreApi.cs
- LifetimeMonitor.cs
- UnsafeNativeMethodsCLR.cs
- RepeatBehaviorConverter.cs