Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / ndp / fx / src / CompMod / System / ComponentModel / LicenseContext.cs / 1 / LicenseContext.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
namespace System.ComponentModel {
using Microsoft.Win32;
using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.Remoting;
using System.Security.Permissions;
///
/// Specifies when the licensed object can be used.
///
[HostProtection(SharedState = true)]
public class LicenseContext : IServiceProvider
{
///
/// When overridden in a derived class, gets a value that specifies when a license can be used.
///
public virtual LicenseUsageMode UsageMode {
get {
return LicenseUsageMode.Runtime;
}
}
///
/// When overridden in a derived class, gets a saved license
/// key for the specified type, from the specified resource assembly.
///
public virtual string GetSavedLicenseKey(Type type, Assembly resourceAssembly) {
return null;
}
///
/// When overridden in a derived class, will return an object that implements the asked for service.
///
public virtual object GetService(Type type) {
return null;
}
///
/// When overridden in a derived class, sets a license key for the specified type.
///
public virtual void SetSavedLicenseKey(Type type, string key) {
// no-op;
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
namespace System.ComponentModel {
using Microsoft.Win32;
using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.Remoting;
using System.Security.Permissions;
///
/// Specifies when the licensed object can be used.
///
[HostProtection(SharedState = true)]
public class LicenseContext : IServiceProvider
{
///
/// When overridden in a derived class, gets a value that specifies when a license can be used.
///
public virtual LicenseUsageMode UsageMode {
get {
return LicenseUsageMode.Runtime;
}
}
///
/// When overridden in a derived class, gets a saved license
/// key for the specified type, from the specified resource assembly.
///
public virtual string GetSavedLicenseKey(Type type, Assembly resourceAssembly) {
return null;
}
///
/// When overridden in a derived class, will return an object that implements the asked for service.
///
public virtual object GetService(Type type) {
return null;
}
///
/// When overridden in a derived class, sets a license key for the specified type.
///
public virtual void SetSavedLicenseKey(Type type, string key) {
// no-op;
}
}
}
// 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
- FixedSOMFixedBlock.cs
- DoubleCollectionValueSerializer.cs
- KerberosSecurityTokenParameters.cs
- ModuleElement.cs
- View.cs
- CfgParser.cs
- ObjectDataProvider.cs
- SmtpReplyReader.cs
- ConfigsHelper.cs
- TextFormatterImp.cs
- RelationshipFixer.cs
- LineVisual.cs
- ZipIORawDataFileBlock.cs
- SmiContextFactory.cs
- X509Certificate2.cs
- ToolStripGrip.cs
- XmlSiteMapProvider.cs
- AbstractSvcMapFileLoader.cs
- DebugView.cs
- GridViewPageEventArgs.cs
- AVElementHelper.cs
- TabPage.cs
- PropertyTabChangedEvent.cs
- RawTextInputReport.cs
- ViewStateException.cs
- ZipIOBlockManager.cs
- CodeDomLoader.cs
- DragCompletedEventArgs.cs
- BasicKeyConstraint.cs
- RoutedCommand.cs
- StagingAreaInputItem.cs
- WorkflowDesigner.cs
- RequestSecurityTokenForRemoteTokenFactory.cs
- HeaderElement.cs
- WebBaseEventKeyComparer.cs
- SerializerWriterEventHandlers.cs
- ConfigXmlComment.cs
- ClientCultureInfo.cs
- DesignTimeHTMLTextWriter.cs
- NameNode.cs
- CatalogPartChrome.cs
- CryptoStream.cs
- EffectiveValueEntry.cs
- RegistrationServices.cs
- HttpListenerContext.cs
- SmtpDigestAuthenticationModule.cs
- HyperLink.cs
- GroupBoxAutomationPeer.cs
- ApplyImportsAction.cs
- ReflectTypeDescriptionProvider.cs
- DataViewManagerListItemTypeDescriptor.cs
- diagnosticsswitches.cs
- MethodBuilderInstantiation.cs
- SystemIPGlobalProperties.cs
- AssociationEndMember.cs
- PriorityChain.cs
- SqlConnectionStringBuilder.cs
- ArrayElementGridEntry.cs
- ConvertTextFrag.cs
- TextTreeTextElementNode.cs
- HttpChannelBindingToken.cs
- PromptStyle.cs
- LabelLiteral.cs
- WorkflowApplicationUnhandledExceptionEventArgs.cs
- ColorDialog.cs
- StreamAsIStream.cs
- RadialGradientBrush.cs
- WebControl.cs
- VersionedStreamOwner.cs
- ManualWorkflowSchedulerService.cs
- ConstraintConverter.cs
- BackStopAuthenticationModule.cs
- MaterialGroup.cs
- RuleProcessor.cs
- BindingContext.cs
- _emptywebproxy.cs
- InvokePattern.cs
- EntityDataSourceViewSchema.cs
- ModuleElement.cs
- PageCatalogPart.cs
- FtpWebResponse.cs
- InternalControlCollection.cs
- StaticExtension.cs
- SqlDataSourceSelectingEventArgs.cs
- Graphics.cs
- WebControl.cs
- MouseButtonEventArgs.cs
- User.cs
- RulePatternOps.cs
- UnsafeNativeMethodsTablet.cs
- DataGridViewTextBoxColumn.cs
- WebResourceAttribute.cs
- RelationshipEnd.cs
- CompatibleIComparer.cs
- CallInfo.cs
- CodeTypeDelegate.cs
- BamlReader.cs
- BooleanExpr.cs
- WsdlBuildProvider.cs
- SiteMapNodeCollection.cs