Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- CacheEntry.cs
- XmlSchemaDocumentation.cs
- Stylus.cs
- PeerApplicationLaunchInfo.cs
- Keyboard.cs
- RelationshipEndCollection.cs
- RowUpdatingEventArgs.cs
- CompositeCollectionView.cs
- GeneralTransform3DTo2DTo3D.cs
- OneOfScalarConst.cs
- DataContractSerializer.cs
- EventLogger.cs
- ToolStripScrollButton.cs
- SafeNativeMethods.cs
- TimeSpan.cs
- ModuleBuilder.cs
- InstanceCreationEditor.cs
- ObjectDataSourceSelectingEventArgs.cs
- XmlSchemaAttributeGroup.cs
- HorizontalAlignConverter.cs
- Root.cs
- WaitHandle.cs
- _HeaderInfoTable.cs
- SqlConnectionString.cs
- TCPClient.cs
- ClientProxyGenerator.cs
- RoleGroup.cs
- OrderedDictionaryStateHelper.cs
- ProcessingInstructionAction.cs
- DirectoryNotFoundException.cs
- InternalConfigRoot.cs
- TemplateControl.cs
- EncoderBestFitFallback.cs
- Set.cs
- TagPrefixInfo.cs
- PropertyFilterAttribute.cs
- Component.cs
- Drawing.cs
- DisplayMemberTemplateSelector.cs
- OrderedDictionary.cs
- XmlAttributeCollection.cs
- ComponentRenameEvent.cs
- CodeObjectCreateExpression.cs
- ChannelServices.cs
- AdornerLayer.cs
- ProgressChangedEventArgs.cs
- SHA384Managed.cs
- CodeSnippetTypeMember.cs
- FormatException.cs
- ServiceInfo.cs
- SmtpNtlmAuthenticationModule.cs
- StructuredTypeInfo.cs
- WindowsFormsLinkLabel.cs
- KeyValueSerializer.cs
- BaseValidator.cs
- OracleException.cs
- ChangesetResponse.cs
- FixUpCollection.cs
- PartialArray.cs
- KeyValueInternalCollection.cs
- QuotedStringWriteStateInfo.cs
- ProviderUtil.cs
- NotCondition.cs
- KernelTypeValidation.cs
- ellipse.cs
- XmlCountingReader.cs
- OleDbError.cs
- FieldDescriptor.cs
- InheritanceRules.cs
- PropertyStore.cs
- VirtualDirectoryMapping.cs
- CalendarDataBindingHandler.cs
- HttpDebugHandler.cs
- TextClipboardData.cs
- ListView.cs
- ImageAutomationPeer.cs
- ObjectTag.cs
- XmlLinkedNode.cs
- TypeResolvingOptions.cs
- ClientScriptManagerWrapper.cs
- EditorBrowsableAttribute.cs
- AssemblyNameProxy.cs
- Vertex.cs
- NumericUpDown.cs
- DescendantBaseQuery.cs
- returneventsaver.cs
- WebPartConnectionsCloseVerb.cs
- TreeNodeConverter.cs
- Pts.cs
- XPathSingletonIterator.cs
- EmptyQuery.cs
- CodePageEncoding.cs
- PolicyUnit.cs
- ReflectionServiceProvider.cs
- DoubleAnimationUsingPath.cs
- _NestedMultipleAsyncResult.cs
- SqlDataReaderSmi.cs
- DataTableReader.cs
- Descriptor.cs
- followingsibling.cs