Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / clr / src / BCL / System / Security / Policy / GACMembershipCondition.cs / 1305376 / GACMembershipCondition.cs
// ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== //[....] // // // GacMembershipCondition.cs // // Implementation of membership condition for being in the Gac // namespace System.Security.Policy { using System; using System.Collections; using System.Globalization; using System.Diagnostics.Contracts; [Serializable] [System.Runtime.InteropServices.ComVisible(true)] sealed public class GacMembershipCondition : IMembershipCondition, IConstantMembershipCondition, IReportMatchMembershipCondition { //------------------------------------------------------ // // PUBLIC CONSTRUCTORS // //----------------------------------------------------- public GacMembershipCondition() { } //----------------------------------------------------- // // IMEMBERSHIPCONDITION IMPLEMENTATION // //----------------------------------------------------- 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; if (evidence == null) return false; return evidence.GetHostEvidence() != null; } public IMembershipCondition Copy() { return new GacMembershipCondition(); } 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(), this.GetType().FullName ); 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" ) ); Contract.EndContractBlock(); } public override bool Equals( Object o ) { GacMembershipCondition that = (o as GacMembershipCondition); if (that != null) return true; return false; } public override int GetHashCode() { return 0; } public override String ToString() { return Environment.GetResourceString( "GAC_ToString" ); } } } // 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
- SyndicationSerializer.cs
- StringAnimationBase.cs
- JsonEncodingStreamWrapper.cs
- DynamicDataExtensions.cs
- RegexRunner.cs
- ConsumerConnectionPoint.cs
- ActivityExecutionContext.cs
- TextRunCacheImp.cs
- UnsafeCollabNativeMethods.cs
- BuildProvidersCompiler.cs
- ObjectStateEntry.cs
- IpcClientManager.cs
- DesignerImageAdapter.cs
- ColorBlend.cs
- SizeConverter.cs
- UIElementParaClient.cs
- MethodImplAttribute.cs
- DifferencingCollection.cs
- LocalizedNameDescriptionPair.cs
- relpropertyhelper.cs
- XmlSchemaExporter.cs
- ImageClickEventArgs.cs
- DiscoveryClientReferences.cs
- GridViewUpdatedEventArgs.cs
- FloatUtil.cs
- SqlFileStream.cs
- OpacityConverter.cs
- PointUtil.cs
- X509ChainPolicy.cs
- BStrWrapper.cs
- HtmlInputControl.cs
- StructuredProperty.cs
- SerialErrors.cs
- Clause.cs
- MimeTypeAttribute.cs
- ObjectStateEntryBaseUpdatableDataRecord.cs
- rsa.cs
- ControlBuilderAttribute.cs
- SchemaSetCompiler.cs
- RuntimeTransactionHandle.cs
- CompositeTypefaceMetrics.cs
- Size3DConverter.cs
- HWStack.cs
- BinaryObjectWriter.cs
- ConfigurationLocationCollection.cs
- VectorCollectionConverter.cs
- LoadItemsEventArgs.cs
- PipeStream.cs
- SettingsSection.cs
- ContextStaticAttribute.cs
- FastEncoderWindow.cs
- StreamingContext.cs
- CallbackDebugBehavior.cs
- latinshape.cs
- ValidatorUtils.cs
- XmlName.cs
- ColorTransformHelper.cs
- RegexBoyerMoore.cs
- RSACryptoServiceProvider.cs
- FunctionImportMapping.cs
- OpCodes.cs
- XmlSchemaSimpleContentRestriction.cs
- WindowsGrip.cs
- PageOutputColor.cs
- TextFormatterImp.cs
- DataRow.cs
- EventPropertyMap.cs
- TriggerAction.cs
- ReflectionUtil.cs
- PropertyGeneratedEventArgs.cs
- SchemaElementDecl.cs
- DataColumnCollection.cs
- ListViewContainer.cs
- DoWorkEventArgs.cs
- WindowClosedEventArgs.cs
- ErrorStyle.cs
- Hash.cs
- _OSSOCK.cs
- PerformanceCounter.cs
- Matrix3DValueSerializer.cs
- TripleDESCryptoServiceProvider.cs
- RemotingSurrogateSelector.cs
- TextCharacters.cs
- ListBase.cs
- DbParameterCollectionHelper.cs
- SignatureGenerator.cs
- CodeTryCatchFinallyStatement.cs
- Gdiplus.cs
- MessageEncoder.cs
- dbenumerator.cs
- TextContainerChangedEventArgs.cs
- ShapeTypeface.cs
- RtfToken.cs
- ComponentDispatcherThread.cs
- ScriptDescriptor.cs
- ToolStripLabel.cs
- InputDevice.cs
- UIPermission.cs
- Bezier.cs
- CodeArrayIndexerExpression.cs