Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / MIT / System / Web / UI / MobileControls / Design / DeviceSpecificDialogCachedState.cs / 1305376 / DeviceSpecificDialogCachedState.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI.Design.MobileControls { using System; using System.Collections; using System.Web.UI.MobileControls; [ System.Security.Permissions.SecurityPermission(System.Security.Permissions.SecurityAction.Demand, Flags=System.Security.Permissions.SecurityPermissionFlag.UnmanagedCode) ] [Obsolete("The System.Web.Mobile.dll assembly has been deprecated and should no longer be used. For information about how to develop ASP.NET mobile applications, see http://go.microsoft.com/fwlink/?LinkId=157231.")] internal class DeviceSpecificDialogCachedState : ICloneable { protected void SaveChoices( IDeviceSpecificDesigner designer, String deviceSpecificID, ICollection choices ) { DeviceSpecific deviceSpecific; if (!designer.GetDeviceSpecific(deviceSpecificID, out deviceSpecific)) { return; } if(choices.Count == 0) { designer.SetDeviceSpecific(deviceSpecificID, null); return; } if (deviceSpecific == null) { deviceSpecific = new DeviceSpecific(); } else { deviceSpecific.Choices.Clear(); } foreach (ChoiceTreeNode node in choices) { node.CommitChanges(); DeviceSpecificChoice choice = node.Choice.RuntimeChoice; deviceSpecific.Choices.Add(choice); } designer.SetDeviceSpecific(deviceSpecificID, deviceSpecific); } ////// Perform shallow copy of state. Cached contents will still /// point to the same instances. /// public Object Clone() { return MemberwiseClone(); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI.Design.MobileControls { using System; using System.Collections; using System.Web.UI.MobileControls; [ System.Security.Permissions.SecurityPermission(System.Security.Permissions.SecurityAction.Demand, Flags=System.Security.Permissions.SecurityPermissionFlag.UnmanagedCode) ] [Obsolete("The System.Web.Mobile.dll assembly has been deprecated and should no longer be used. For information about how to develop ASP.NET mobile applications, see http://go.microsoft.com/fwlink/?LinkId=157231.")] internal class DeviceSpecificDialogCachedState : ICloneable { protected void SaveChoices( IDeviceSpecificDesigner designer, String deviceSpecificID, ICollection choices ) { DeviceSpecific deviceSpecific; if (!designer.GetDeviceSpecific(deviceSpecificID, out deviceSpecific)) { return; } if(choices.Count == 0) { designer.SetDeviceSpecific(deviceSpecificID, null); return; } if (deviceSpecific == null) { deviceSpecific = new DeviceSpecific(); } else { deviceSpecific.Choices.Clear(); } foreach (ChoiceTreeNode node in choices) { node.CommitChanges(); DeviceSpecificChoice choice = node.Choice.RuntimeChoice; deviceSpecific.Choices.Add(choice); } designer.SetDeviceSpecific(deviceSpecificID, deviceSpecific); } ////// Perform shallow copy of state. Cached contents will still /// point to the same instances. /// public Object Clone() { return MemberwiseClone(); } } } // 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
- XslTransform.cs
- EntityDataSourceWrapper.cs
- ForAllOperator.cs
- DragSelectionMessageFilter.cs
- HtmlMeta.cs
- ArgumentDesigner.xaml.cs
- DaylightTime.cs
- ListViewTableRow.cs
- ConfigurationSettings.cs
- TextPointerBase.cs
- ServiceHostingEnvironment.cs
- QilChoice.cs
- UpdateProgress.cs
- Parameter.cs
- IssuedTokenServiceElement.cs
- TableLayoutPanelResizeGlyph.cs
- OleStrCAMarshaler.cs
- ProcessHostMapPath.cs
- DataSet.cs
- ApplicationBuildProvider.cs
- FormCollection.cs
- SecurityPolicySection.cs
- InfoCardArgumentException.cs
- DataGridColumn.cs
- ProvideValueServiceProvider.cs
- ManagedIStream.cs
- UnionCodeGroup.cs
- ValidatingReaderNodeData.cs
- XmlMtomReader.cs
- TypeInfo.cs
- XmlSchemaImport.cs
- RuleSetBrowserDialog.cs
- GeometryModel3D.cs
- MarkupCompilePass1.cs
- TextLineBreak.cs
- precedingquery.cs
- CompilerResults.cs
- NeedSkipTokenVisitor.cs
- CounterSample.cs
- TitleStyle.cs
- SmtpSection.cs
- SiteMapProvider.cs
- PolicyVersionConverter.cs
- TemplateInstanceAttribute.cs
- Propagator.JoinPropagator.JoinPredicateVisitor.cs
- Soap12FormatExtensions.cs
- MetafileHeader.cs
- DoubleKeyFrameCollection.cs
- OutputCacheProfile.cs
- Persist.cs
- Semaphore.cs
- MouseGesture.cs
- PrintDialog.cs
- LineBreak.cs
- LiteralText.cs
- TypedDataSetSchemaImporterExtensionFx35.cs
- SHA1CryptoServiceProvider.cs
- SystemMulticastIPAddressInformation.cs
- ParserHooks.cs
- VoiceObjectToken.cs
- SubpageParagraph.cs
- TraceSection.cs
- DPCustomTypeDescriptor.cs
- ExecutionEngineException.cs
- DNS.cs
- InputLanguageCollection.cs
- DesigntimeLicenseContextSerializer.cs
- figurelengthconverter.cs
- ManualResetEvent.cs
- ComponentCollection.cs
- BaseAddressElement.cs
- X509ScopedServiceCertificateElementCollection.cs
- TypeToken.cs
- SchemaMapping.cs
- MarkupProperty.cs
- XPathAncestorIterator.cs
- RegexCompiler.cs
- Cast.cs
- StubHelpers.cs
- GC.cs
- MonthCalendar.cs
- DecoderFallbackWithFailureFlag.cs
- EncryptedData.cs
- MessageUtil.cs
- WindowsFormsHost.cs
- XmlSchemaSequence.cs
- ShaderRenderModeValidation.cs
- HttpResponse.cs
- SafeMILHandle.cs
- CancellationTokenSource.cs
- RefreshPropertiesAttribute.cs
- HitTestParameters.cs
- FixedDocument.cs
- ListBoxAutomationPeer.cs
- ImpersonateTokenRef.cs
- XmlUTF8TextReader.cs
- TransformerInfoCollection.cs
- StringResourceManager.cs
- SpecialTypeDataContract.cs
- LinearQuaternionKeyFrame.cs