Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / wpf / src / Core / CSharp / System / Windows / Markup / XamlSerializerUtil.cs / 1 / XamlSerializerUtil.cs
//---------------------------------------------------------------------------- // // File: XamlSerializerUtil.cs // // Description: // Static Helper methods used for Serialization. // // Copyright (C) 2005 by Microsoft Corporation. All rights reserved. // //--------------------------------------------------------------------------- using System; using MS.Internal.PresentationCore; namespace System.Windows.Markup { ////// Static helper methods used for Serialization process /// internal static class XamlCoreSerializerUtil { static XamlCoreSerializerUtil() { // // Dummy code to keep IAddChildInternal from being optimized out of // PresentationCore. PLEASE REMOVE WHEN IAddChildInternal DISAPPEARS. // ThrowIfIAddChildInternal("not IAddChildInternal"); } internal static void ThrowIfIAddChildInternal(object o) { // // Dummy code to keep IAddChildInternal from being optimized out of // PresentationCore. PLEASE REMOVE WHEN IAddChildInternal DISAPPEARS. // if ( o is IAddChildInternal) { throw new InvalidOperationException(); } } ////// Throw an exception if the passed string is not empty and is not /// all whitespace. This is used to check IAddChild.AddText calls for /// objects that don't handle text, but may get some whitespace if /// if xml:space="preserve" is set in xaml. /// internal static void ThrowIfNonWhiteSpaceInAddText(string s) { if (s != null) { for (int i = 0; i < s.Length; i++) { if (!Char.IsWhiteSpace(s[i])) { throw new ArgumentException(SR.Get(SRID.NonWhiteSpaceInAddText, s)); } } } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. //---------------------------------------------------------------------------- // // File: XamlSerializerUtil.cs // // Description: // Static Helper methods used for Serialization. // // Copyright (C) 2005 by Microsoft Corporation. All rights reserved. // //--------------------------------------------------------------------------- using System; using MS.Internal.PresentationCore; namespace System.Windows.Markup { ////// Static helper methods used for Serialization process /// internal static class XamlCoreSerializerUtil { static XamlCoreSerializerUtil() { // // Dummy code to keep IAddChildInternal from being optimized out of // PresentationCore. PLEASE REMOVE WHEN IAddChildInternal DISAPPEARS. // ThrowIfIAddChildInternal("not IAddChildInternal"); } internal static void ThrowIfIAddChildInternal(object o) { // // Dummy code to keep IAddChildInternal from being optimized out of // PresentationCore. PLEASE REMOVE WHEN IAddChildInternal DISAPPEARS. // if ( o is IAddChildInternal) { throw new InvalidOperationException(); } } ////// Throw an exception if the passed string is not empty and is not /// all whitespace. This is used to check IAddChild.AddText calls for /// objects that don't handle text, but may get some whitespace if /// if xml:space="preserve" is set in xaml. /// internal static void ThrowIfNonWhiteSpaceInAddText(string s) { if (s != null) { for (int i = 0; i < s.Length; i++) { if (!Char.IsWhiteSpace(s[i])) { throw new ArgumentException(SR.Get(SRID.NonWhiteSpaceInAddText, s)); } } } } } } // 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
- ConstructorArgumentAttribute.cs
- CategoryValueConverter.cs
- ContentElement.cs
- QilXmlWriter.cs
- PtsCache.cs
- HtmlToClrEventProxy.cs
- LineInfo.cs
- VectorAnimationUsingKeyFrames.cs
- CodeComment.cs
- HttpConfigurationContext.cs
- InkPresenterAutomationPeer.cs
- ZipIOLocalFileHeader.cs
- ResourceExpressionBuilder.cs
- GrammarBuilderRuleRef.cs
- NetworkInformationPermission.cs
- LocatorManager.cs
- IFlowDocumentViewer.cs
- RegionIterator.cs
- RelativeSource.cs
- RemotingException.cs
- ModelToObjectValueConverter.cs
- BrowserTree.cs
- PreProcessor.cs
- AmbientEnvironment.cs
- LoadRetryHandler.cs
- _CacheStreams.cs
- itemelement.cs
- ReadonlyMessageFilter.cs
- NamedElement.cs
- XmlBufferReader.cs
- CompilerInfo.cs
- ListSortDescriptionCollection.cs
- DBNull.cs
- CommandLineParser.cs
- ApplicationProxyInternal.cs
- BStrWrapper.cs
- FeatureSupport.cs
- DynamicPropertyHolder.cs
- PointCollectionConverter.cs
- ContourSegment.cs
- AnonymousIdentificationSection.cs
- RSAPKCS1SignatureFormatter.cs
- TrackPointCollection.cs
- ObjectStateEntryBaseUpdatableDataRecord.cs
- ChannelBinding.cs
- ComponentCollection.cs
- CaseCqlBlock.cs
- DetailsViewPagerRow.cs
- Compiler.cs
- HtmlInputRadioButton.cs
- Message.cs
- SizeLimitedCache.cs
- CodeDirectionExpression.cs
- ServiceModelDictionary.cs
- ReadOnlyDataSourceView.cs
- GridViewRowEventArgs.cs
- TrustSection.cs
- BinaryFormatterWriter.cs
- BaseTemplatedMobileComponentEditor.cs
- RSAPKCS1SignatureDeformatter.cs
- PlanCompilerUtil.cs
- SkipStoryboardToFill.cs
- HandledMouseEvent.cs
- Module.cs
- exports.cs
- URLEditor.cs
- ToolboxDataAttribute.cs
- webclient.cs
- OdbcDataAdapter.cs
- WebBrowserDesigner.cs
- Config.cs
- XmlCharacterData.cs
- CDSCollectionETWBCLProvider.cs
- WindowsListViewItemStartMenu.cs
- DesignTimeHTMLTextWriter.cs
- StringUtil.cs
- LocalFileSettingsProvider.cs
- _SingleItemRequestCache.cs
- IDReferencePropertyAttribute.cs
- odbcmetadatacollectionnames.cs
- PeerNearMe.cs
- StorageEntityTypeMapping.cs
- SecurityResources.cs
- AttributeProviderAttribute.cs
- GlyphingCache.cs
- FilteredAttributeCollection.cs
- RealizedColumnsBlock.cs
- RemoteWebConfigurationHostServer.cs
- SqlError.cs
- ConfigurationException.cs
- Transform3DGroup.cs
- COM2PropertyBuilderUITypeEditor.cs
- WebEventCodes.cs
- AlternateViewCollection.cs
- Metadata.cs
- UserMapPath.cs
- AsynchronousChannel.cs
- Line.cs
- BinHexDecoder.cs
- COM2ColorConverter.cs