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
- DrawListViewItemEventArgs.cs
- CompiledRegexRunner.cs
- ErrorRuntimeConfig.cs
- GeometryDrawing.cs
- XmlUrlResolver.cs
- MediaContextNotificationWindow.cs
- OracleConnectionString.cs
- Base64Encoder.cs
- GeneralTransform3DGroup.cs
- IndentedTextWriter.cs
- WebConfigurationFileMap.cs
- EntityContainerEmitter.cs
- DragDeltaEventArgs.cs
- SystemIPInterfaceStatistics.cs
- DataControlPagerLinkButton.cs
- DataGridViewRowEventArgs.cs
- TextBoxAutoCompleteSourceConverter.cs
- InputQueueChannel.cs
- MemberRelationshipService.cs
- StylusCaptureWithinProperty.cs
- IERequestCache.cs
- Models.cs
- DataGridViewCellStyleEditor.cs
- TabControl.cs
- GlobalAllocSafeHandle.cs
- GenerateTemporaryTargetAssembly.cs
- _LazyAsyncResult.cs
- NavigatorInput.cs
- OutputCacheProfileCollection.cs
- DataBoundControlHelper.cs
- UMPAttributes.cs
- SessionPageStateSection.cs
- DescendentsWalker.cs
- AssemblyResourceLoader.cs
- DrawingGroupDrawingContext.cs
- GreenMethods.cs
- PropertyEmitterBase.cs
- CallContext.cs
- ByteStack.cs
- PageCopyCount.cs
- ObjectSet.cs
- SQLUtility.cs
- ComboBoxItem.cs
- DetailsViewInsertedEventArgs.cs
- MailSettingsSection.cs
- ServiceModelConfiguration.cs
- SerializationInfoEnumerator.cs
- EntityDataSourceDesignerHelper.cs
- DataContext.cs
- UpDownEvent.cs
- XmlNamespaceMapping.cs
- TimeZone.cs
- ScaleTransform3D.cs
- DeflateStream.cs
- GraphicsState.cs
- ObjectPersistData.cs
- CustomError.cs
- CompositeDuplexBindingElement.cs
- AnimationTimeline.cs
- ConnectionManagementElement.cs
- ValuePattern.cs
- InputMethodStateTypeInfo.cs
- ParagraphResult.cs
- ProxyGenerationError.cs
- X509ScopedServiceCertificateElementCollection.cs
- UrlUtility.cs
- SqlUtils.cs
- WebPartConnectionsCancelVerb.cs
- UnaryExpressionHelper.cs
- EventArgs.cs
- _LazyAsyncResult.cs
- HatchBrush.cs
- RequiredArgumentAttribute.cs
- CellQuery.cs
- NameValuePair.cs
- ConfigurationSchemaErrors.cs
- TableRowsCollectionEditor.cs
- AlternationConverter.cs
- Closure.cs
- TabControlEvent.cs
- DurableInstance.cs
- DataBoundControlAdapter.cs
- LightweightCodeGenerator.cs
- AuthenticationService.cs
- WorkflowMarkupSerializationException.cs
- HtmlInputReset.cs
- StateBag.cs
- ThrowHelper.cs
- EventOpcode.cs
- MimeObjectFactory.cs
- NativeMethods.cs
- HGlobalSafeHandle.cs
- filewebrequest.cs
- CultureTable.cs
- ProtocolsConfiguration.cs
- DetailsViewPageEventArgs.cs
- EntityDataSourceWrapperPropertyDescriptor.cs
- ToolStripItemClickedEventArgs.cs
- ObjectHandle.cs
- SizeFConverter.cs