Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / ndp / fx / src / xsp / System / Web / UI / WebParts / PersonalizationEntry.cs / 5 / PersonalizationEntry.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
namespace System.Web.UI.WebControls.WebParts {
using System;
using System.Security.Permissions;
[AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)]
public sealed class PersonalizationEntry {
private PersonalizationScope _scope;
private object _value;
private bool _isSensitive;
public PersonalizationEntry(object value, PersonalizationScope scope) : this(value, scope, false) {
}
public PersonalizationEntry(object value, PersonalizationScope scope, bool isSensitive) {
PersonalizationProviderHelper.CheckPersonalizationScope(scope);
_value = value;
_scope = scope;
_isSensitive = isSensitive;
}
public PersonalizationScope Scope {
get {
return _scope;
}
set {
if (value < PersonalizationScope.User || value > PersonalizationScope.Shared) {
throw new ArgumentOutOfRangeException("value");
}
_scope = value;
}
}
public object Value {
get {
return _value;
}
set {
_value = value;
}
}
public bool IsSensitive {
get {
return _isSensitive;
}
set {
_isSensitive = value;
}
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
namespace System.Web.UI.WebControls.WebParts {
using System;
using System.Security.Permissions;
[AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)]
public sealed class PersonalizationEntry {
private PersonalizationScope _scope;
private object _value;
private bool _isSensitive;
public PersonalizationEntry(object value, PersonalizationScope scope) : this(value, scope, false) {
}
public PersonalizationEntry(object value, PersonalizationScope scope, bool isSensitive) {
PersonalizationProviderHelper.CheckPersonalizationScope(scope);
_value = value;
_scope = scope;
_isSensitive = isSensitive;
}
public PersonalizationScope Scope {
get {
return _scope;
}
set {
if (value < PersonalizationScope.User || value > PersonalizationScope.Shared) {
throw new ArgumentOutOfRangeException("value");
}
_scope = value;
}
}
public object Value {
get {
return _value;
}
set {
_value = value;
}
}
public bool IsSensitive {
get {
return _isSensitive;
}
set {
_isSensitive = value;
}
}
}
}
// 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
- GenericAuthenticationEventArgs.cs
- TableDetailsCollection.cs
- TakeQueryOptionExpression.cs
- XmlQueryOutput.cs
- ExpressionBuilderCollection.cs
- Path.cs
- NeutralResourcesLanguageAttribute.cs
- DesignerCategoryAttribute.cs
- MgmtConfigurationRecord.cs
- CompatibleComparer.cs
- DataGridCellEditEndingEventArgs.cs
- DoubleIndependentAnimationStorage.cs
- XmlNamespaceManager.cs
- WindowsScrollBar.cs
- Speller.cs
- linebase.cs
- ListView.cs
- PixelFormatConverter.cs
- BitmapSizeOptions.cs
- SQLRoleProvider.cs
- StateMachineExecutionState.cs
- UnsafeNativeMethods.cs
- AssemblyAttributesGoHere.cs
- InternalUserCancelledException.cs
- CustomLineCap.cs
- NavigationProperty.cs
- Perspective.cs
- StringKeyFrameCollection.cs
- Permission.cs
- XPathNavigator.cs
- AccessedThroughPropertyAttribute.cs
- DateTimeAutomationPeer.cs
- CommandExpr.cs
- NullRuntimeConfig.cs
- ToolStripSeparatorRenderEventArgs.cs
- TextBox.cs
- SimpleMailWebEventProvider.cs
- GraphicsPathIterator.cs
- ValidatorCompatibilityHelper.cs
- MLangCodePageEncoding.cs
- _ShellExpression.cs
- LongValidatorAttribute.cs
- RIPEMD160Managed.cs
- TdsRecordBufferSetter.cs
- DescriptionAttribute.cs
- CalendarTable.cs
- ArgIterator.cs
- printdlgexmarshaler.cs
- _SpnDictionary.cs
- WCFServiceClientProxyGenerator.cs
- FlowDocumentScrollViewer.cs
- CultureTableRecord.cs
- GridViewDeletedEventArgs.cs
- __Error.cs
- ObjectTag.cs
- RIPEMD160.cs
- NetworkInterface.cs
- MetadataArtifactLoaderXmlReaderWrapper.cs
- EditingMode.cs
- _PooledStream.cs
- AppDomainShutdownMonitor.cs
- DataGridItem.cs
- XmlSchemaCompilationSettings.cs
- MdiWindowListItemConverter.cs
- NativeMethods.cs
- WebMessageBodyStyleHelper.cs
- QueuePathDialog.cs
- ConfigurationManagerInternal.cs
- SelectionRange.cs
- WinEventWrap.cs
- BitStream.cs
- XslException.cs
- Transform3D.cs
- WebDisplayNameAttribute.cs
- BreadCrumbTextConverter.cs
- HtmlWindowCollection.cs
- XmlDeclaration.cs
- ProxyWebPartManagerDesigner.cs
- SerialReceived.cs
- SymbolDocumentGenerator.cs
- WebPartAddingEventArgs.cs
- SqlError.cs
- XmlChildNodes.cs
- TagMapInfo.cs
- TabControl.cs
- SecurityTokenAuthenticator.cs
- BitmapScalingModeValidation.cs
- OletxTransactionHeader.cs
- DataExpression.cs
- CultureInfo.cs
- Privilege.cs
- TableRowCollection.cs
- CustomErrorCollection.cs
- SqlBuilder.cs
- TextTreeUndo.cs
- ClientProxyGenerator.cs
- RecipientInfo.cs
- Cursors.cs
- ManualResetEventSlim.cs
- CodeMemberMethod.cs