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
- LicenseProviderAttribute.cs
- SecurityManager.cs
- SchemaNotation.cs
- StringUtil.cs
- ConfigXmlReader.cs
- Bits.cs
- DocComment.cs
- BitmapEffectvisualstate.cs
- BasicHttpBindingElement.cs
- DirtyTextRange.cs
- IfElseDesigner.xaml.cs
- XmlSchemaComplexContent.cs
- DataControlLinkButton.cs
- Subtree.cs
- TextRange.cs
- CultureTableRecord.cs
- KeyFrames.cs
- ServiceObjectContainer.cs
- EUCJPEncoding.cs
- Send.cs
- FileEnumerator.cs
- MembershipAdapter.cs
- TypePresenter.xaml.cs
- PriorityBindingExpression.cs
- PageTextBox.cs
- ping.cs
- InfoCardArgumentException.cs
- SafeBitVector32.cs
- SqlDataSourceEnumerator.cs
- HttpGetProtocolImporter.cs
- FileNotFoundException.cs
- StateMachineDesignerPaint.cs
- WebEventCodes.cs
- TagMapInfo.cs
- MsmqIntegrationProcessProtocolHandler.cs
- MsmqInputMessage.cs
- DbDataRecord.cs
- InstanceLockLostException.cs
- PropertyPathWorker.cs
- AuthorizationSection.cs
- XPathQueryGenerator.cs
- RMEnrollmentPage2.cs
- sqlnorm.cs
- SqlStatistics.cs
- DesignerCommandSet.cs
- PeerPresenceInfo.cs
- PopupEventArgs.cs
- ObjectItemConventionAssemblyLoader.cs
- DbConnectionClosed.cs
- ExecutionScope.cs
- DateTimeParse.cs
- AsyncOperationManager.cs
- TextSpanModifier.cs
- ChineseLunisolarCalendar.cs
- MimeTypeMapper.cs
- StringDictionaryWithComparer.cs
- ColorConverter.cs
- SocketStream.cs
- PropertyItem.cs
- PrimitiveCodeDomSerializer.cs
- wgx_sdk_version.cs
- MenuTracker.cs
- CompilerError.cs
- PerformanceCounterPermission.cs
- SharedPersonalizationStateInfo.cs
- RoutedUICommand.cs
- FieldAccessException.cs
- SettingsPropertyValue.cs
- ValidationEventArgs.cs
- ComponentResourceKeyConverter.cs
- StringCollectionEditor.cs
- ProviderConnectionPoint.cs
- CompoundFileStorageReference.cs
- MessageBox.cs
- EventHandlersStore.cs
- CreateParams.cs
- DetailsViewDeleteEventArgs.cs
- CultureInfoConverter.cs
- ContentAlignmentEditor.cs
- BrowserCapabilitiesCodeGenerator.cs
- UserControlCodeDomTreeGenerator.cs
- Padding.cs
- TextViewBase.cs
- ExpressionReplacer.cs
- CompositeCollectionView.cs
- BinaryReader.cs
- CultureTableRecord.cs
- XmlSchemaChoice.cs
- Thread.cs
- BufferedReadStream.cs
- AdornerPresentationContext.cs
- ServiceAuthorizationElement.cs
- DataGridViewCellToolTipTextNeededEventArgs.cs
- ManagementEventArgs.cs
- StringExpressionSet.cs
- QuaternionConverter.cs
- SystemColors.cs
- HtmlControl.cs
- AutomationAttributeInfo.cs
- PrivilegeNotHeldException.cs