Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Core / CSharp / System / Windows / Media / CacheMode.cs / 1305600 / CacheMode.cs
//------------------------------------------------------------------------------ // Microsoft Avalon // Copyright (c) Microsoft Corporation, 2008 // // File: CacheMode.cs //----------------------------------------------------------------------------- using System.ComponentModel; using SR=MS.Internal.PresentationCore.SR; using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media { public abstract partial class CacheMode { internal CacheMode () { } ////// Parse - this method is called by the type converter to parse a CacheMode's string /// (provided in "value"). /// ////// A CacheMode which was created by parsing the "value" argument. /// /// String representation of a CacheMode. Cannot be null/empty. internal static CacheMode Parse(string value) { CacheMode cacheMode = null; if (value == "BitmapCache") { cacheMode = new BitmapCache(); } else { throw new FormatException(SR.Get(SRID.Parsers_IllegalToken)); } return cacheMode; } ////// Can serialze "this" to a string /// internal virtual bool CanSerializeToString() { return false; } internal virtual string ConvertToString(string format, IFormatProvider provider) { return base.ToString(); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. //------------------------------------------------------------------------------ // Microsoft Avalon // Copyright (c) Microsoft Corporation, 2008 // // File: CacheMode.cs //----------------------------------------------------------------------------- using System.ComponentModel; using SR=MS.Internal.PresentationCore.SR; using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media { public abstract partial class CacheMode { internal CacheMode () { } ////// Parse - this method is called by the type converter to parse a CacheMode's string /// (provided in "value"). /// ////// A CacheMode which was created by parsing the "value" argument. /// /// String representation of a CacheMode. Cannot be null/empty. internal static CacheMode Parse(string value) { CacheMode cacheMode = null; if (value == "BitmapCache") { cacheMode = new BitmapCache(); } else { throw new FormatException(SR.Get(SRID.Parsers_IllegalToken)); } return cacheMode; } ////// Can serialze "this" to a string /// internal virtual bool CanSerializeToString() { return false; } internal virtual string ConvertToString(string format, IFormatProvider provider) { return base.ToString(); } } } // 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
- BulletedList.cs
- EnumValAlphaComparer.cs
- ScriptServiceAttribute.cs
- BinaryWriter.cs
- BinaryVersion.cs
- StringUtil.cs
- ProcessHost.cs
- BindingMAnagerBase.cs
- PointAnimationUsingKeyFrames.cs
- SettingsPropertyWrongTypeException.cs
- XsltFunctions.cs
- LicenseException.cs
- GridViewSortEventArgs.cs
- BitConverter.cs
- SpanIndex.cs
- EnumBuilder.cs
- ClassHandlersStore.cs
- CounterSet.cs
- HostedHttpTransportManager.cs
- WriteStateInfoBase.cs
- NodeLabelEditEvent.cs
- SchemaSetCompiler.cs
- LinkClickEvent.cs
- CacheEntry.cs
- ShortcutKeysEditor.cs
- ParserContext.cs
- bindurihelper.cs
- ConfigUtil.cs
- PeerNeighborManager.cs
- FlowLayoutSettings.cs
- KeyFrames.cs
- ImageDrawing.cs
- ApplicationSettingsBase.cs
- FontTypeConverter.cs
- HtmlContainerControl.cs
- ShapingWorkspace.cs
- Point4DConverter.cs
- SingleResultAttribute.cs
- Utilities.cs
- CodeStatementCollection.cs
- HMACRIPEMD160.cs
- CustomExpression.cs
- Point3DValueSerializer.cs
- MatrixValueSerializer.cs
- TouchFrameEventArgs.cs
- ArrayConverter.cs
- MessageDecoder.cs
- BinaryMessageEncodingElement.cs
- ChildTable.cs
- Speller.cs
- SafeHandles.cs
- StringToken.cs
- StaticTextPointer.cs
- XmlWriter.cs
- MinimizableAttributeTypeConverter.cs
- ResourceDisplayNameAttribute.cs
- TerminatorSinks.cs
- XMLUtil.cs
- ControlCachePolicy.cs
- ProfileManager.cs
- CapabilitiesRule.cs
- SystemColorTracker.cs
- StreamUpdate.cs
- DataRowExtensions.cs
- Component.cs
- SoapCodeExporter.cs
- QilFunction.cs
- WmfPlaceableFileHeader.cs
- XmlSchemaImport.cs
- TemplateControlCodeDomTreeGenerator.cs
- AmbientValueAttribute.cs
- DragDrop.cs
- Events.cs
- ObjectManager.cs
- _DomainName.cs
- MappingItemCollection.cs
- HttpModuleCollection.cs
- NumberSubstitution.cs
- BoolExpr.cs
- QuaternionAnimationBase.cs
- HMACMD5.cs
- ScaleTransform3D.cs
- ReadOnlyHierarchicalDataSource.cs
- MSG.cs
- DispatcherEventArgs.cs
- PropertyInfoSet.cs
- TextTreeUndoUnit.cs
- AccessDataSource.cs
- Visual.cs
- SqlUtils.cs
- DataTableReader.cs
- ToolStripPanelSelectionBehavior.cs
- SoapObjectWriter.cs
- InheritedPropertyDescriptor.cs
- RecognizerStateChangedEventArgs.cs
- BaseTemplateCodeDomTreeGenerator.cs
- Image.cs
- EventLogSession.cs
- HtmlShimManager.cs
- TypeToStringValueConverter.cs