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
- WebControl.cs
- MarkupExtensionParser.cs
- FactoryMaker.cs
- HitTestWithGeometryDrawingContextWalker.cs
- SrgsElementList.cs
- OrderPreservingMergeHelper.cs
- ReflectTypeDescriptionProvider.cs
- CookieParameter.cs
- CalculatedColumn.cs
- ProxyManager.cs
- StringReader.cs
- ToolBarPanel.cs
- Int32Storage.cs
- FileUtil.cs
- DefaultParameterValueAttribute.cs
- EUCJPEncoding.cs
- OdbcConnectionStringbuilder.cs
- DataConnectionHelper.cs
- NavigationProgressEventArgs.cs
- PrivacyNoticeElement.cs
- SoapCommonClasses.cs
- MainMenu.cs
- PrimaryKeyTypeConverter.cs
- SoapHeader.cs
- DebugView.cs
- GridView.cs
- SevenBitStream.cs
- QilDataSource.cs
- ExcCanonicalXml.cs
- TextTreeInsertUndoUnit.cs
- ActiveXContainer.cs
- DependencyObjectType.cs
- PhysicalFontFamily.cs
- ExportOptions.cs
- SoapDocumentMethodAttribute.cs
- Latin1Encoding.cs
- MethodAccessException.cs
- DtcInterfaces.cs
- RemoteWebConfigurationHostStream.cs
- CollectionChange.cs
- Expression.cs
- PageVisual.cs
- FunctionQuery.cs
- GridViewDeleteEventArgs.cs
- RecordManager.cs
- HtmlToClrEventProxy.cs
- LookupNode.cs
- QilFactory.cs
- HtmlSelect.cs
- SelectionRangeConverter.cs
- DataKeyCollection.cs
- RewritingPass.cs
- StrokeFIndices.cs
- PropertyDescriptor.cs
- MailAddress.cs
- RelationshipEndCollection.cs
- TreeIterator.cs
- Validator.cs
- DataSetMappper.cs
- dtdvalidator.cs
- Control.cs
- DataGridViewCellConverter.cs
- DataTablePropertyDescriptor.cs
- RequiredFieldValidator.cs
- ContentDisposition.cs
- ParentUndoUnit.cs
- BrowserCapabilitiesFactory.cs
- MLangCodePageEncoding.cs
- oledbmetadatacollectionnames.cs
- CompiledQueryCacheKey.cs
- TokenCreationParameter.cs
- InputReport.cs
- SystemIPAddressInformation.cs
- PieceNameHelper.cs
- XmlSchemaParticle.cs
- ChannelManager.cs
- HostingEnvironment.cs
- RectangleF.cs
- DiscoveryClientBindingElement.cs
- Table.cs
- ClusterRegistryConfigurationProvider.cs
- FontFamily.cs
- XDeferredAxisSource.cs
- WhitespaceRule.cs
- AutomationPropertyInfo.cs
- NewItemsContextMenuStrip.cs
- SHA384Managed.cs
- KeyProperty.cs
- TdsParameterSetter.cs
- InitiatorSessionSymmetricMessageSecurityProtocol.cs
- ChangeTracker.cs
- EmptyEnumerator.cs
- VersionedStreamOwner.cs
- BaseProcessor.cs
- GridViewCellAutomationPeer.cs
- RSACryptoServiceProvider.cs
- AdRotatorDesigner.cs
- RadioButton.cs
- BinaryExpression.cs
- DataGridColumnStyleMappingNameEditor.cs