Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / 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;
}
}
}
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- RolePrincipal.cs
- ConvertersCollection.cs
- GPPOINT.cs
- CoTaskMemHandle.cs
- OdbcEnvironmentHandle.cs
- DrawingAttributeSerializer.cs
- printdlgexmarshaler.cs
- FunctionParameter.cs
- MenuCommands.cs
- SafeMarshalContext.cs
- TreeNodeEventArgs.cs
- SafeHandles.cs
- PolygonHotSpot.cs
- FormatterConverter.cs
- DefaultValueTypeConverter.cs
- RawStylusInput.cs
- SingleSelectRootGridEntry.cs
- SoapExtensionReflector.cs
- Set.cs
- ProfileService.cs
- DropShadowBitmapEffect.cs
- OSFeature.cs
- ThemeDirectoryCompiler.cs
- SecurityException.cs
- ListParagraph.cs
- SiteMapPath.cs
- TemplatedMailWebEventProvider.cs
- SafeCancelMibChangeNotify.cs
- ReadOnlyObservableCollection.cs
- MessageSecurityOverTcp.cs
- EventsTab.cs
- MarkupWriter.cs
- PathSegmentCollection.cs
- ItemDragEvent.cs
- ModelUIElement3D.cs
- FunctionDefinition.cs
- EllipseGeometry.cs
- XmlAttributeProperties.cs
- TextOnlyOutput.cs
- TextTreeDeleteContentUndoUnit.cs
- SafeFileMapViewHandle.cs
- DbDeleteCommandTree.cs
- DataGridViewRowEventArgs.cs
- FontInfo.cs
- TableHeaderCell.cs
- MonitorWrapper.cs
- InvokeMethod.cs
- FieldToken.cs
- HtmlControl.cs
- XmlEncApr2001.cs
- DBDataPermissionAttribute.cs
- EventLogPermissionAttribute.cs
- WebPartCancelEventArgs.cs
- DomNameTable.cs
- safelinkcollection.cs
- ChildrenQuery.cs
- SchemaCollectionPreprocessor.cs
- EntityTypeBase.cs
- InstanceKey.cs
- AppLevelCompilationSectionCache.cs
- DllHostInitializer.cs
- TextServicesPropertyRanges.cs
- IISMapPath.cs
- MessageParameterAttribute.cs
- graph.cs
- CodeTypeReference.cs
- TextElementEnumerator.cs
- ColorTransform.cs
- MetadataItemEmitter.cs
- CheckBoxField.cs
- BitmapPalettes.cs
- FileSystemInfo.cs
- XsdBuilder.cs
- EventHandlersStore.cs
- WinEventHandler.cs
- SizeAnimationBase.cs
- OperatorExpressions.cs
- IndexerReference.cs
- ZipIOZip64EndOfCentralDirectoryBlock.cs
- EntityDataSourceDesigner.cs
- CommonDialog.cs
- ComboBoxRenderer.cs
- PreparingEnlistment.cs
- TextRangeEditTables.cs
- BStrWrapper.cs
- XmlHelper.cs
- Color.cs
- Polyline.cs
- DataGridView.cs
- BackStopAuthenticationModule.cs
- OdbcPermission.cs
- XappLauncher.cs
- ProxyWebPartConnectionCollection.cs
- NoneExcludedImageIndexConverter.cs
- TextEffect.cs
- EncryptedReference.cs
- BaseServiceProvider.cs
- TextureBrush.cs
- DataControlButton.cs
- ComponentEditorPage.cs