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
- SoapCodeExporter.cs
- PeerContact.cs
- ResolveNameEventArgs.cs
- CompilationUnit.cs
- CapabilitiesPattern.cs
- TextViewBase.cs
- TextBox.cs
- ManagementClass.cs
- BaseTemplateCodeDomTreeGenerator.cs
- ColumnBinding.cs
- CommandBindingCollection.cs
- GridEntryCollection.cs
- LicenseProviderAttribute.cs
- SizeAnimationClockResource.cs
- EndpointAddressElementBase.cs
- AssociationProvider.cs
- DecoderNLS.cs
- Axis.cs
- SocketManager.cs
- assertwrapper.cs
- SpanIndex.cs
- SqlEnums.cs
- LinqDataSourceHelper.cs
- Empty.cs
- Geometry.cs
- IsolatedStoragePermission.cs
- SpecialTypeDataContract.cs
- VirtualizingStackPanel.cs
- ResourceProperty.cs
- IDispatchConstantAttribute.cs
- RequestQueryParser.cs
- HandledMouseEvent.cs
- EnumBuilder.cs
- TemplateNameScope.cs
- ImageIndexConverter.cs
- PersonalizationStateQuery.cs
- AnnotationResourceChangedEventArgs.cs
- Repeater.cs
- ToolboxItemFilterAttribute.cs
- DataGridItemCollection.cs
- StylusPointPropertyUnit.cs
- SmiRecordBuffer.cs
- MDIClient.cs
- MessageDecoder.cs
- FastEncoderWindow.cs
- DataRecord.cs
- DataGridTextBox.cs
- DispatcherExceptionEventArgs.cs
- CodeEventReferenceExpression.cs
- SRDisplayNameAttribute.cs
- Registry.cs
- MouseGestureValueSerializer.cs
- AnimatedTypeHelpers.cs
- EditorAttribute.cs
- HttpFileCollectionWrapper.cs
- WindowsStreamSecurityElement.cs
- XmlDataSourceNodeDescriptor.cs
- SchemaTableColumn.cs
- XmlSchemaComplexContent.cs
- StrokeNodeEnumerator.cs
- ApplicationServicesHostFactory.cs
- HideDisabledControlAdapter.cs
- _NestedMultipleAsyncResult.cs
- XComponentModel.cs
- ToolStripDesignerAvailabilityAttribute.cs
- WebSysDescriptionAttribute.cs
- PickBranch.cs
- SignedPkcs7.cs
- ResourceDisplayNameAttribute.cs
- WS2007FederationHttpBindingCollectionElement.cs
- CheckBox.cs
- WebAdminConfigurationHelper.cs
- XPathSingletonIterator.cs
- UTF8Encoding.cs
- TableRowsCollectionEditor.cs
- PerfService.cs
- MulticastOption.cs
- MailHeaderInfo.cs
- DeflateStream.cs
- DbConnectionPoolGroupProviderInfo.cs
- Symbol.cs
- UrlMappingCollection.cs
- autovalidator.cs
- ObjectParameter.cs
- DeploymentSection.cs
- WindowsAuthenticationModule.cs
- CustomAttributeFormatException.cs
- RegionInfo.cs
- AssemblyHash.cs
- ProcessThreadDesigner.cs
- WebEncodingValidator.cs
- NativeMethods.cs
- HttpCacheVary.cs
- MenuBindingsEditor.cs
- Polygon.cs
- ServiceModelExtensionElement.cs
- DefaultTextStoreTextComposition.cs
- ColumnBinding.cs
- QuotedPairReader.cs
- ArrowControl.xaml.cs