Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / ndp / fx / src / xsp / System / Web / UI / WebParts / PersonalizationEntry.cs / 1 / 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
- UnaryExpression.cs
- ClaimComparer.cs
- DPAPIProtectedConfigurationProvider.cs
- ScriptingScriptResourceHandlerSection.cs
- AuthorizationRuleCollection.cs
- ProxyWebPartManager.cs
- AudioStateChangedEventArgs.cs
- Thickness.cs
- XmlTextReaderImplHelpers.cs
- CancellationHandler.cs
- ComponentEvent.cs
- BitmapEffectOutputConnector.cs
- ControlParameter.cs
- EtwTrace.cs
- NameValuePair.cs
- ContextMenuStrip.cs
- ReadOnlyDataSource.cs
- RemoteWebConfigurationHostStream.cs
- CodeIdentifiers.cs
- CapabilitiesAssignment.cs
- ReliableMessagingVersion.cs
- DataSetSchema.cs
- MethodSet.cs
- XmlSchemaAttributeGroupRef.cs
- DesignerGenericWebPart.cs
- PauseStoryboard.cs
- AmbientValueAttribute.cs
- WmlControlAdapter.cs
- _AutoWebProxyScriptWrapper.cs
- DocumentAutomationPeer.cs
- MaterialGroup.cs
- XmlLinkedNode.cs
- WebServiceTypeData.cs
- Monitor.cs
- ViewStateModeByIdAttribute.cs
- RegexGroupCollection.cs
- RequestTimeoutManager.cs
- _NegoStream.cs
- RealProxy.cs
- ValidationEventArgs.cs
- DescendentsWalkerBase.cs
- DbQueryCommandTree.cs
- XsdDateTime.cs
- PseudoWebRequest.cs
- RelationshipConverter.cs
- AuthorizationSection.cs
- EdmToObjectNamespaceMap.cs
- CopyCodeAction.cs
- ParameterBuilder.cs
- RuntimeCompatibilityAttribute.cs
- ProgressBarRenderer.cs
- TextEndOfSegment.cs
- CustomAttributeBuilder.cs
- ISO2022Encoding.cs
- ContentHostHelper.cs
- CustomAttributeBuilder.cs
- Part.cs
- NativeMethods.cs
- InvalidWMPVersionException.cs
- SeverityFilter.cs
- FlagsAttribute.cs
- SerializationHelper.cs
- WindowPattern.cs
- DynamicMethod.cs
- ELinqQueryState.cs
- MultiByteCodec.cs
- LoadRetryHandler.cs
- NameValuePermission.cs
- ErrorLog.cs
- GregorianCalendarHelper.cs
- OpenTypeLayoutCache.cs
- WebBrowserEvent.cs
- RoleService.cs
- GetMemberBinder.cs
- ObfuscationAttribute.cs
- _LocalDataStore.cs
- TypedTableBase.cs
- EmissiveMaterial.cs
- MembershipUser.cs
- SqlDataAdapter.cs
- ElementsClipboardData.cs
- Subordinate.cs
- LayoutSettings.cs
- RenderData.cs
- SoapFormatter.cs
- WebGetAttribute.cs
- ConnectionPointCookie.cs
- VoiceObjectToken.cs
- HwndStylusInputProvider.cs
- SoapCodeExporter.cs
- Opcode.cs
- NullReferenceException.cs
- ConfigDefinitionUpdates.cs
- Lasso.cs
- DPCustomTypeDescriptor.cs
- Delay.cs
- ProcessThread.cs
- TextOptions.cs
- oledbconnectionstring.cs
- FilteredAttributeCollection.cs