Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Base / MS / Internal / Permissions / CompoundFileIOPermission.cs / 1305600 / CompoundFileIOPermission.cs
//----------------------------------------------------------------------------
//
//
// Copyright (C) Microsoft Corporation. All rights reserved.
//
//
//
// Description: CompoundFile IO Permission.
// It is a class for permission that will be asserted/demanded internally.
// Only XPSViewer (or Mongoose) code will assert this permission.
//
// Using it allows the following:
// We can have very specific targeted asserts for enabling EncryptedPackageEnevelope
// and CompoundFile IO APIs.
// This is to provide a granular permission for CompoundFile IO operations to be used
// by XPSViewer to enable Encrypted Documents scenarios in Partial Trust
// rather than asserting broader permission such as Unmanaged Code
//
// !!!! Warning !!!!: No code other than XPSViewer (or Mongoose) should assert this
// permission without agreement from this code owners.
//
// History:
// 02/10/06 : [....] - Created
//---------------------------------------------------------------------------
using System;
using System.Text;
using System.Security;
using System.Security.Permissions;
using System.Windows;
using MS.Internal.WindowsBase;
namespace MS.Internal.Permissions
{
// !!!! Warning !!!!: No code other than XPSViewer (or Mongoose) should assert this
// permission without agreement from this code owners.
[Serializable]
[FriendAccessAllowed]
internal class CompoundFileIOPermission : InternalParameterlessPermissionBase
{
public CompoundFileIOPermission() : this(PermissionState.Unrestricted)
{
}
public CompoundFileIOPermission(PermissionState state): base(state)
{
}
public override IPermission Copy()
{
// There is no state: just return a new instance of CompoudFileIOPermission
return new CompoundFileIOPermission();
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.
//----------------------------------------------------------------------------
//
//
// Copyright (C) Microsoft Corporation. All rights reserved.
//
//
//
// Description: CompoundFile IO Permission.
// It is a class for permission that will be asserted/demanded internally.
// Only XPSViewer (or Mongoose) code will assert this permission.
//
// Using it allows the following:
// We can have very specific targeted asserts for enabling EncryptedPackageEnevelope
// and CompoundFile IO APIs.
// This is to provide a granular permission for CompoundFile IO operations to be used
// by XPSViewer to enable Encrypted Documents scenarios in Partial Trust
// rather than asserting broader permission such as Unmanaged Code
//
// !!!! Warning !!!!: No code other than XPSViewer (or Mongoose) should assert this
// permission without agreement from this code owners.
//
// History:
// 02/10/06 : [....] - Created
//---------------------------------------------------------------------------
using System;
using System.Text;
using System.Security;
using System.Security.Permissions;
using System.Windows;
using MS.Internal.WindowsBase;
namespace MS.Internal.Permissions
{
// !!!! Warning !!!!: No code other than XPSViewer (or Mongoose) should assert this
// permission without agreement from this code owners.
[Serializable]
[FriendAccessAllowed]
internal class CompoundFileIOPermission : InternalParameterlessPermissionBase
{
public CompoundFileIOPermission() : this(PermissionState.Unrestricted)
{
}
public CompoundFileIOPermission(PermissionState state): base(state)
{
}
public override IPermission Copy()
{
// There is no state: just return a new instance of CompoudFileIOPermission
return new CompoundFileIOPermission();
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- PolicyVersion.cs
- InkCollectionBehavior.cs
- GridViewCommandEventArgs.cs
- RemoteCryptoSignHashRequest.cs
- InstanceCompleteException.cs
- ISAPIApplicationHost.cs
- CategoryNameCollection.cs
- MatchingStyle.cs
- InvalidDataException.cs
- OleDbInfoMessageEvent.cs
- ListenerSingletonConnectionReader.cs
- ObjectDataSourceEventArgs.cs
- VisualCollection.cs
- StyleXamlParser.cs
- PropertyDescriptor.cs
- DecimalAnimationUsingKeyFrames.cs
- DashStyle.cs
- MailWebEventProvider.cs
- XmlSerializerNamespaces.cs
- UnsafeNativeMethods.cs
- ItemContainerPattern.cs
- DesignTimeParseData.cs
- FirstMatchCodeGroup.cs
- WindowsClaimSet.cs
- WindowsFormsSynchronizationContext.cs
- PersonalizationEntry.cs
- PopupEventArgs.cs
- Group.cs
- DbTransaction.cs
- ObjectCloneHelper.cs
- MasterPageBuildProvider.cs
- AliasedExpr.cs
- XPathExpr.cs
- DataGridRowClipboardEventArgs.cs
- Parameter.cs
- TypeDescriptorContext.cs
- SafeProcessHandle.cs
- NotificationContext.cs
- XmlILConstructAnalyzer.cs
- WebPartManager.cs
- SqlGenericUtil.cs
- CopyOnWriteList.cs
- CngUIPolicy.cs
- PageClientProxyGenerator.cs
- KeyValuePair.cs
- ApplicationBuildProvider.cs
- TextEditorLists.cs
- LoginView.cs
- WebPartExportVerb.cs
- HtmlImage.cs
- Serializer.cs
- ParameterBuilder.cs
- Errors.cs
- CryptoProvider.cs
- SystemWebCachingSectionGroup.cs
- SourceElementsCollection.cs
- UndoManager.cs
- ToolStripArrowRenderEventArgs.cs
- Latin1Encoding.cs
- InputElement.cs
- CriticalHandle.cs
- XmlValidatingReader.cs
- AccessKeyManager.cs
- CodeCastExpression.cs
- AttachmentCollection.cs
- Site.cs
- SymmetricAlgorithm.cs
- StaticFileHandler.cs
- NonParentingControl.cs
- ObjectAnimationUsingKeyFrames.cs
- XmlDataDocument.cs
- LessThanOrEqual.cs
- CheckBox.cs
- RenameRuleObjectDialog.cs
- DataRecordInternal.cs
- GridViewSortEventArgs.cs
- RenderData.cs
- SharedPerformanceCounter.cs
- CookieHandler.cs
- DetailsViewDeletedEventArgs.cs
- BuildProvider.cs
- DtdParser.cs
- webproxy.cs
- SafeRightsManagementQueryHandle.cs
- AudioException.cs
- CompareValidator.cs
- SystemColors.cs
- PolicyLevel.cs
- ChtmlTextWriter.cs
- WeakKeyDictionary.cs
- DocumentApplicationDocumentViewer.cs
- ToolStripOverflow.cs
- ObjectDataSourceDisposingEventArgs.cs
- DispatchChannelSink.cs
- RectAnimationUsingKeyFrames.cs
- EventlogProvider.cs
- Model3DGroup.cs
- RowType.cs
- CompiledRegexRunnerFactory.cs
- UrlMappingCollection.cs