Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Core / CSharp / System / Windows / Markup / XamlSerializerUtil.cs / 1305600 / 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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- RequestQueryParser.cs
- PolicyStatement.cs
- Int32CollectionConverter.cs
- ContextMenu.cs
- Pens.cs
- SoundPlayerAction.cs
- JapaneseLunisolarCalendar.cs
- SqlBulkCopy.cs
- DialogWindow.cs
- Int32CollectionValueSerializer.cs
- TextTreeUndo.cs
- SdlChannelSink.cs
- ColorContextHelper.cs
- ResolveInfo.cs
- ChildTable.cs
- ArraySegment.cs
- SmiEventSink.cs
- FrameworkElement.cs
- BamlLocalizerErrorNotifyEventArgs.cs
- ColorAnimation.cs
- RewritingValidator.cs
- NonVisualControlAttribute.cs
- FixedPageProcessor.cs
- XmlQueryRuntime.cs
- IndependentAnimationStorage.cs
- BindingNavigator.cs
- X509RawDataKeyIdentifierClause.cs
- RuntimeConfig.cs
- TextViewBase.cs
- rsa.cs
- RuleSettings.cs
- SharedPersonalizationStateInfo.cs
- XmlDataDocument.cs
- CacheMode.cs
- Tracking.cs
- FramingFormat.cs
- IPCCacheManager.cs
- CommandEventArgs.cs
- X509Extension.cs
- baseaxisquery.cs
- AddInSegmentDirectoryNotFoundException.cs
- X509ChainPolicy.cs
- SchemaName.cs
- Property.cs
- XmlDataSource.cs
- Aggregates.cs
- MenuItemCollection.cs
- DataGridBoolColumn.cs
- RadioButton.cs
- CanonicalXml.cs
- DataView.cs
- MatrixCamera.cs
- QueryTask.cs
- BinaryReader.cs
- SaveFileDialog.cs
- FtpCachePolicyElement.cs
- SafeCryptContextHandle.cs
- Underline.cs
- IriParsingElement.cs
- GeometryConverter.cs
- Section.cs
- TextRangeEditLists.cs
- StyleSheet.cs
- Matrix.cs
- TextBounds.cs
- WaitHandle.cs
- SchemaNamespaceManager.cs
- TemplateControlParser.cs
- GridErrorDlg.cs
- ResetableIterator.cs
- EntityTypeEmitter.cs
- SubclassTypeValidator.cs
- SQLString.cs
- nulltextnavigator.cs
- MimeTypePropertyAttribute.cs
- LayoutTableCell.cs
- PersistenceTask.cs
- OleDbCommandBuilder.cs
- RoleService.cs
- DoubleAnimationUsingPath.cs
- JavaScriptObjectDeserializer.cs
- UniqueIdentifierService.cs
- _ChunkParse.cs
- HtmlElementCollection.cs
- AvTrace.cs
- Int32CollectionConverter.cs
- Point3D.cs
- RegistryHandle.cs
- SimpleApplicationHost.cs
- DecoderExceptionFallback.cs
- ProfessionalColors.cs
- PersonalizableAttribute.cs
- ThreadStartException.cs
- HighlightVisual.cs
- SudsCommon.cs
- ContractsBCL.cs
- Convert.cs
- validationstate.cs
- MimeObjectFactory.cs
- CodeAttributeArgumentCollection.cs