Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / untmp / whidbey / QFE / ndp / clr / src / BCL / System / Security / Policy / AllMembershipCondition.cs / 2 / 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 assertt 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 assertt 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ConstructorArgumentAttribute.cs
- BitmapSourceSafeMILHandle.cs
- OleDbParameterCollection.cs
- HttpCapabilitiesSectionHandler.cs
- WCFBuildProvider.cs
- ListCollectionView.cs
- CodeDomConfigurationHandler.cs
- MulticastNotSupportedException.cs
- HtmlEmptyTagControlBuilder.cs
- RoleServiceManager.cs
- SerializationObjectManager.cs
- TemplateField.cs
- MenuAdapter.cs
- UIElementHelper.cs
- AQNBuilder.cs
- BooleanStorage.cs
- TypeElement.cs
- MultipleViewPattern.cs
- StatusStrip.cs
- RelationshipEnd.cs
- CharUnicodeInfo.cs
- LambdaCompiler.Generated.cs
- WebEventTraceProvider.cs
- OracleConnectionFactory.cs
- TypeGeneratedEventArgs.cs
- DataViewListener.cs
- DynamicActivityTypeDescriptor.cs
- Tokenizer.cs
- SqlCacheDependencyDatabaseCollection.cs
- SharedStatics.cs
- XmlUtilWriter.cs
- MULTI_QI.cs
- TabPage.cs
- FunctionMappingTranslator.cs
- DSACryptoServiceProvider.cs
- CacheMemory.cs
- BamlLocalizer.cs
- AdPostCacheSubstitution.cs
- DbBuffer.cs
- MemoryMappedViewAccessor.cs
- querybuilder.cs
- FileLevelControlBuilderAttribute.cs
- GeneralTransform3DTo2D.cs
- Missing.cs
- ConfigurationSchemaErrors.cs
- XmlSchemaAttribute.cs
- IDReferencePropertyAttribute.cs
- TargetException.cs
- ObjectSet.cs
- Validator.cs
- CodeArrayCreateExpression.cs
- AdRotatorDesigner.cs
- PolicyDesigner.cs
- GridViewHeaderRowPresenterAutomationPeer.cs
- WebPartChrome.cs
- GlobalizationSection.cs
- HttpProfileBase.cs
- DragDeltaEventArgs.cs
- SqlDependency.cs
- DataBindEngine.cs
- EpmTargetPathSegment.cs
- TreeNodeConverter.cs
- AttributeData.cs
- WindowsListViewSubItem.cs
- CodeAccessPermission.cs
- CharConverter.cs
- PassportIdentity.cs
- SafeLibraryHandle.cs
- ObjectTag.cs
- NotifyParentPropertyAttribute.cs
- LookupBindingPropertiesAttribute.cs
- IdentityHolder.cs
- PrintPreviewControl.cs
- ScrollItemProviderWrapper.cs
- DeferredTextReference.cs
- SHA1CryptoServiceProvider.cs
- ProgressPage.cs
- SByte.cs
- HttpException.cs
- RealizationDrawingContextWalker.cs
- OleDbTransaction.cs
- BufferedWebEventProvider.cs
- NullReferenceException.cs
- RuleAction.cs
- SiteMapDataSource.cs
- PathFigureCollection.cs
- ImageFormatConverter.cs
- Function.cs
- PreviewKeyDownEventArgs.cs
- PipelineDeploymentState.cs
- Stroke2.cs
- ComponentResourceKeyConverter.cs
- ConnectionConsumerAttribute.cs
- RequestQueryParser.cs
- XmlSchemaComplexType.cs
- InfoCardService.cs
- CommandID.cs
- XPathDocumentIterator.cs
- ProxyWebPartConnectionCollection.cs
- ProfessionalColorTable.cs