Code:
/ DotNET / DotNET / 8.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
- QilName.cs
- PerformanceCounterPermissionEntryCollection.cs
- CqlParser.cs
- querybuilder.cs
- SessionStateItemCollection.cs
- NonVisualControlAttribute.cs
- COSERVERINFO.cs
- EntityDataSourceState.cs
- UInt32Storage.cs
- FrameworkElementAutomationPeer.cs
- configsystem.cs
- ReadWriteControlDesigner.cs
- AnimationClockResource.cs
- PageEventArgs.cs
- NamedObjectList.cs
- ConfigurationException.cs
- InteropAutomationProvider.cs
- FixedPageStructure.cs
- BoundColumn.cs
- EmptyControlCollection.cs
- WindowsFormsLinkLabel.cs
- RtfNavigator.cs
- UnsignedPublishLicense.cs
- ProxySimple.cs
- WorkflowStateRollbackService.cs
- Hex.cs
- GridItemProviderWrapper.cs
- XMLUtil.cs
- PanelDesigner.cs
- DEREncoding.cs
- TypeSystem.cs
- Trace.cs
- TextSelectionHighlightLayer.cs
- KnownBoxes.cs
- CompilationUtil.cs
- XmlWrappingReader.cs
- NestedContainer.cs
- DocumentCollection.cs
- IdentityReference.cs
- DrawingAttributes.cs
- LoadedEvent.cs
- DataRowIndexBuffer.cs
- IntegrationExceptionEventArgs.cs
- xdrvalidator.cs
- ScriptControlDescriptor.cs
- ReflectionPermission.cs
- OutOfMemoryException.cs
- EffectiveValueEntry.cs
- SQLBinary.cs
- CapabilitiesState.cs
- InternalResources.cs
- ErrorInfoXmlDocument.cs
- ConfigUtil.cs
- CellParagraph.cs
- PersonalizationProviderCollection.cs
- ListItemsCollectionEditor.cs
- ExpressionBuilderCollection.cs
- Gdiplus.cs
- Polygon.cs
- __ConsoleStream.cs
- ItemsPresenter.cs
- RequestCacheEntry.cs
- XMLSyntaxException.cs
- MachineSettingsSection.cs
- WSTransactionSection.cs
- Rss20ItemFormatter.cs
- CryptoApi.cs
- EventMap.cs
- TPLETWProvider.cs
- PropertyValueUIItem.cs
- XmlCharType.cs
- CodeTypeMemberCollection.cs
- SettingsProperty.cs
- SecurityManager.cs
- TabControl.cs
- XamlStream.cs
- DynamicILGenerator.cs
- DeleteBookmarkScope.cs
- LocalizableResourceBuilder.cs
- SmtpDigestAuthenticationModule.cs
- StrokeCollectionDefaultValueFactory.cs
- CheckBoxField.cs
- SoapRpcMethodAttribute.cs
- ActivityExecutionFilter.cs
- ClientTargetSection.cs
- SafeViewOfFileHandle.cs
- ProxyGenerator.cs
- UpdatePanelTrigger.cs
- XmlSchemaAnnotated.cs
- StateChangeEvent.cs
- Calendar.cs
- AutomationElementIdentifiers.cs
- sqlmetadatafactory.cs
- SplayTreeNode.cs
- RuleSettings.cs
- PlainXmlWriter.cs
- AuthenticateEventArgs.cs
- DataBindingList.cs
- FilterQueryOptionExpression.cs
- ReferencedCollectionType.cs