Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / CompMod / System / ComponentModel / LicenseContext.cs / 1305376 / 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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- PerformanceCounter.cs
- ChtmlPageAdapter.cs
- DefaultAsyncDataDispatcher.cs
- diagnosticsswitches.cs
- XmlSchemaType.cs
- HashUtility.cs
- InputQueue.cs
- Add.cs
- ControlValuePropertyAttribute.cs
- DBCommandBuilder.cs
- LocalizableResourceBuilder.cs
- MSAAWinEventWrap.cs
- FixedSOMContainer.cs
- LinearQuaternionKeyFrame.cs
- ProfileManager.cs
- PropertyPathWorker.cs
- StorageEntityTypeMapping.cs
- AssemblyResourceLoader.cs
- BaseTemplateCodeDomTreeGenerator.cs
- FlowDocumentScrollViewer.cs
- Math.cs
- DeviceSpecificChoice.cs
- CustomErrorCollection.cs
- BatchWriter.cs
- MethodBody.cs
- ReachSerializableProperties.cs
- ParsedAttributeCollection.cs
- ScriptControlManager.cs
- KeyNotFoundException.cs
- WebPartDisplayModeEventArgs.cs
- DialogWindow.cs
- LayoutInformation.cs
- TableLayoutPanel.cs
- Native.cs
- IndicShape.cs
- XsltOutput.cs
- RepeaterItem.cs
- OdbcDataAdapter.cs
- EntityDataSourceChangedEventArgs.cs
- XmlILConstructAnalyzer.cs
- EmptyElement.cs
- sqlpipe.cs
- SocketPermission.cs
- SQLInt16Storage.cs
- ToolStripLocationCancelEventArgs.cs
- BoundField.cs
- AmbientEnvironment.cs
- XPathScanner.cs
- WorkflowQueuingService.cs
- FileUpload.cs
- DefaultValidator.cs
- GridViewRowCollection.cs
- BasicExpandProvider.cs
- AliasGenerator.cs
- Membership.cs
- RtfFormatStack.cs
- DataTrigger.cs
- ExeConfigurationFileMap.cs
- DbSourceParameterCollection.cs
- IconBitmapDecoder.cs
- SqlUtils.cs
- RecognizerInfo.cs
- FeatureSupport.cs
- WindowsPen.cs
- FlowDocument.cs
- ImageButton.cs
- DrawingImage.cs
- HyperLinkStyle.cs
- IndexedDataBuffer.cs
- ActivityDefaults.cs
- XmlNodeChangedEventManager.cs
- ConnectorDragDropGlyph.cs
- ValueType.cs
- DocumentApplicationJournalEntry.cs
- WebPartsSection.cs
- WebConvert.cs
- AssemblyCollection.cs
- TCPClient.cs
- StringSorter.cs
- SocketPermission.cs
- DBConnectionString.cs
- RawMouseInputReport.cs
- CssTextWriter.cs
- AutomationProperties.cs
- EntityClientCacheKey.cs
- GAC.cs
- ProfileSettings.cs
- Unit.cs
- DataGridDetailsPresenterAutomationPeer.cs
- InfoCardArgumentException.cs
- CryptoConfig.cs
- DispatchWrapper.cs
- TouchEventArgs.cs
- CommandBindingCollection.cs
- ValueSerializerAttribute.cs
- COM2Properties.cs
- PropertyValueChangedEvent.cs
- TextPointerBase.cs
- Deserializer.cs
- Models.cs