Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / 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 { public AllMembershipCondition() { } public bool Check( Evidence evidence ) { 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(); } } }
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- HttpPostedFile.cs
- ArraySegment.cs
- TypedServiceChannelBuilder.cs
- Sql8ExpressionRewriter.cs
- KeyTime.cs
- ClientTargetCollection.cs
- CellRelation.cs
- WebConfigurationHostFileChange.cs
- CapabilitiesSection.cs
- CmsInterop.cs
- XPathNodeList.cs
- SafeNativeMethods.cs
- CompilationAssemblyInstallComponent.cs
- TypeDelegator.cs
- XamlStyleSerializer.cs
- SettingsPropertyWrongTypeException.cs
- ObjectContext.cs
- DataGridSortCommandEventArgs.cs
- Hyperlink.cs
- ExpressionNode.cs
- MLangCodePageEncoding.cs
- ApplicationFileParser.cs
- SqlTopReducer.cs
- InstanceDescriptor.cs
- NativeRecognizer.cs
- NumericUpDownAcceleration.cs
- TextSelection.cs
- dbenumerator.cs
- DataGridViewBindingCompleteEventArgs.cs
- ExceptionWrapper.cs
- DatasetMethodGenerator.cs
- NeutralResourcesLanguageAttribute.cs
- NativeMethods.cs
- SoapFormatterSinks.cs
- SqlCacheDependencySection.cs
- ClientWindowsAuthenticationMembershipProvider.cs
- AutoGeneratedFieldProperties.cs
- XmlEnumAttribute.cs
- CalloutQueueItem.cs
- ActivityMetadata.cs
- Stack.cs
- PageHandlerFactory.cs
- ToolStripStatusLabel.cs
- SslStream.cs
- dsa.cs
- ItemsControlAutomationPeer.cs
- UnknownWrapper.cs
- ErrorStyle.cs
- Propagator.JoinPropagator.cs
- Debug.cs
- QueryOperationResponseOfT.cs
- QilParameter.cs
- CallbackHandler.cs
- SliderAutomationPeer.cs
- TemplateControlParser.cs
- XamlSerializationHelper.cs
- PartialList.cs
- ICspAsymmetricAlgorithm.cs
- SqlDataSourceQueryEditorForm.cs
- RepeatButton.cs
- PKCS1MaskGenerationMethod.cs
- DataChangedEventManager.cs
- EventEntry.cs
- RbTree.cs
- RewritingValidator.cs
- DesignerView.Commands.cs
- SimpleWebHandlerParser.cs
- DataGridGeneralPage.cs
- IDictionary.cs
- SourceCollection.cs
- XmlParser.cs
- ObjectAnimationUsingKeyFrames.cs
- XMLSchema.cs
- AttachedPropertyBrowsableForTypeAttribute.cs
- RealizationDrawingContextWalker.cs
- NotFiniteNumberException.cs
- RegisteredHiddenField.cs
- SoapExtensionTypeElement.cs
- Compiler.cs
- Predicate.cs
- ConditionalAttribute.cs
- COM2IManagedPerPropertyBrowsingHandler.cs
- XPathAncestorQuery.cs
- DirectoryLocalQuery.cs
- ValuePattern.cs
- NavigationProperty.cs
- AuthenticatedStream.cs
- ClosableStream.cs
- MethodExpr.cs
- ShutDownListener.cs
- SqlMethodTransformer.cs
- SoapReflectionImporter.cs
- SoapElementAttribute.cs
- DesignerProperties.cs
- WebAdminConfigurationHelper.cs
- XmlElementList.cs
- AttachedPropertyDescriptor.cs
- WriteableBitmap.cs
- ChildrenQuery.cs
- HitTestWithGeometryDrawingContextWalker.cs