Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / fx / src / CompMod / System / ComponentModel / LicenseProviderAttribute.cs / 1 / LicenseProviderAttribute.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.ComponentModel { using System; using System.Security.Permissions; ////// [AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = false)] public sealed class LicenseProviderAttribute : Attribute { ///Specifies the ////// to use with a class. /// public static readonly LicenseProviderAttribute Default = new LicenseProviderAttribute(); private Type licenseProviderType = null; private string licenseProviderName = null; ////// Specifies the default value, which is no provider. This ///field is read-only. /// /// public LicenseProviderAttribute() : this((string)null) { } ///Initializes a new instance of the ///class without a license /// provider. /// public LicenseProviderAttribute(string typeName) { licenseProviderName = typeName; } ////// Initializes a new instance of the ///class with /// the specified type. /// /// public LicenseProviderAttribute(Type type) { licenseProviderType = type; } ////// Initializes a new instance of the ///class with /// the specified type of license provider. /// /// public Type LicenseProvider { // SECREVIEW: Remove this attribute once bug#411910 is fixed. [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2113:SecureLateBindingMethods")] get { if (licenseProviderType == null && licenseProviderName != null) { licenseProviderType = Type.GetType(licenseProviderName); } return licenseProviderType; } } ///Gets the license provider to use with the associated class. ////// /// public override object TypeId { get { string typeName = licenseProviderName; if (typeName == null && licenseProviderType != null) { typeName = licenseProviderType.FullName; } return GetType().FullName + typeName; } } ////// This defines a unique ID for this attribute type. It is used /// by filtering algorithms to identify two attributes that are /// the same type. For most attributes, this just returns the /// Type instance for the attribute. LicenseProviderAttribute overrides this to include the type name and the /// provider type name. /// ////// /// public override bool Equals(object value) { if (value is LicenseProviderAttribute && value != null) { Type type = ((LicenseProviderAttribute)value).LicenseProvider; if (type == LicenseProvider) { return true; } else { if (type != null && type.Equals(LicenseProvider)) { return true; } } } return false; } ////// public override int GetHashCode() { return base.GetHashCode(); } } }/// Returns the hashcode for this object. /// ///
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- PrinterUnitConvert.cs
- XPathNavigatorReader.cs
- SiteMapProvider.cs
- LowerCaseStringConverter.cs
- CookieHandler.cs
- OutputCacheProfile.cs
- BaseParser.cs
- WindowsAltTab.cs
- TimelineClockCollection.cs
- util.cs
- EdmFunction.cs
- OpCellTreeNode.cs
- NodeInfo.cs
- WeakHashtable.cs
- XmlSchemaException.cs
- MdiWindowListStrip.cs
- _ServiceNameStore.cs
- wgx_render.cs
- Array.cs
- RawStylusInputReport.cs
- LocalValueEnumerator.cs
- ObjectPersistData.cs
- WebScriptClientGenerator.cs
- LinqDataSourceContextEventArgs.cs
- UpdateCommand.cs
- SyndicationSerializer.cs
- BinHexDecoder.cs
- BrowserCapabilitiesCompiler.cs
- StickyNoteContentControl.cs
- EndpointConfigContainer.cs
- PropertyManager.cs
- RecordConverter.cs
- BitmapImage.cs
- BitmapMetadataBlob.cs
- ShaderEffect.cs
- GetChildSubtree.cs
- ColorTransformHelper.cs
- ReachDocumentReferenceSerializer.cs
- TCEAdapterGenerator.cs
- EntityModelBuildProvider.cs
- CompiledIdentityConstraint.cs
- DefaultShape.cs
- CompilationPass2TaskInternal.cs
- ScriptingJsonSerializationSection.cs
- TransactionProxy.cs
- ExcludePathInfo.cs
- NativeCppClassAttribute.cs
- Rotation3DKeyFrameCollection.cs
- AuditLogLocation.cs
- Command.cs
- InfocardClientCredentials.cs
- BaseParser.cs
- XmlSerializerFormatAttribute.cs
- ScriptReference.cs
- ComPlusDiagnosticTraceSchemas.cs
- NullableFloatAverageAggregationOperator.cs
- Switch.cs
- PointCollection.cs
- ICollection.cs
- Vector3D.cs
- XPathQilFactory.cs
- DbMetaDataCollectionNames.cs
- ListViewCancelEventArgs.cs
- RegisteredHiddenField.cs
- AutomationAttributeInfo.cs
- AsyncDataRequest.cs
- ObjectStateEntryDbDataRecord.cs
- TypefaceMetricsCache.cs
- SqlLiftIndependentRowExpressions.cs
- StreamWithDictionary.cs
- GridView.cs
- BoundPropertyEntry.cs
- RegexRunner.cs
- CompiledQueryCacheKey.cs
- XmlAnyElementAttribute.cs
- HttpDictionary.cs
- TimeSpanMinutesConverter.cs
- IntegrationExceptionEventArgs.cs
- BorderGapMaskConverter.cs
- ToolStripDropDownItem.cs
- SettingsPropertyWrongTypeException.cs
- CombinedGeometry.cs
- ReliabilityContractAttribute.cs
- GridViewDeleteEventArgs.cs
- NetNamedPipeBinding.cs
- HtmlInputSubmit.cs
- mactripleDES.cs
- ScriptRegistrationManager.cs
- DataPagerFieldItem.cs
- WebPartUtil.cs
- BitStack.cs
- ToolZone.cs
- BrowserCapabilitiesFactory.cs
- NameValueConfigurationCollection.cs
- Imaging.cs
- FontResourceCache.cs
- RemoteX509AsymmetricSecurityKey.cs
- MatrixConverter.cs
- QilCloneVisitor.cs
- GeometryDrawing.cs