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
- ReceiveReply.cs
- StreamHelper.cs
- TemplateBamlRecordReader.cs
- PropertyChangedEventManager.cs
- ListenerHandler.cs
- DateTimeFormatInfo.cs
- PropertyNames.cs
- DocumentApplicationState.cs
- SimpleExpression.cs
- DigitalSignatureProvider.cs
- SystemNetHelpers.cs
- IxmlLineInfo.cs
- XpsPackagingPolicy.cs
- MembershipSection.cs
- UnsafeNativeMethods.cs
- NamespaceEmitter.cs
- SessionStateContainer.cs
- COM2FontConverter.cs
- AffineTransform3D.cs
- wmiutil.cs
- Lazy.cs
- RtfToXamlReader.cs
- TimeZone.cs
- CharacterShapingProperties.cs
- AxParameterData.cs
- XmlSchemaObjectCollection.cs
- SqlNamer.cs
- ColumnWidthChangingEvent.cs
- ProxyManager.cs
- StrokeSerializer.cs
- PersistencePipeline.cs
- XmlSchemaExternal.cs
- PackageDigitalSignatureManager.cs
- RenderOptions.cs
- Block.cs
- FlowDocumentScrollViewer.cs
- SupportingTokenSpecification.cs
- TextElementEnumerator.cs
- _ShellExpression.cs
- PointCollectionValueSerializer.cs
- TemplateBuilder.cs
- Rect3D.cs
- InplaceBitmapMetadataWriter.cs
- SinglePageViewer.cs
- FontNamesConverter.cs
- Msmq3PoisonHandler.cs
- AtomEntry.cs
- HttpCookieCollection.cs
- ImageMetadata.cs
- UInt16Converter.cs
- BindableAttribute.cs
- XmlDataSource.cs
- AllowedAudienceUriElement.cs
- DesignerCategoryAttribute.cs
- MetadataItem_Static.cs
- ResXFileRef.cs
- securitymgrsite.cs
- NegotiationTokenAuthenticatorState.cs
- HttpConfigurationContext.cs
- Logging.cs
- PartialTrustVisibleAssemblyCollection.cs
- XmlHierarchicalEnumerable.cs
- VerificationAttribute.cs
- Events.cs
- ComponentDispatcher.cs
- DataObject.cs
- NestPullup.cs
- WinInetCache.cs
- RealizedColumnsBlock.cs
- IdlingCommunicationPool.cs
- HelpKeywordAttribute.cs
- GlyphsSerializer.cs
- TextViewSelectionProcessor.cs
- DataAccessException.cs
- ReadOnlyNameValueCollection.cs
- ManifestBasedResourceGroveler.cs
- UrlAuthFailedErrorFormatter.cs
- HMAC.cs
- ScrollEventArgs.cs
- AspNetHostingPermission.cs
- HtmlTableCellCollection.cs
- ClassHandlersStore.cs
- SmtpCommands.cs
- XmlElementAttribute.cs
- InvalidAsynchronousStateException.cs
- CodeDefaultValueExpression.cs
- SafeNativeMethods.cs
- NativeMethods.cs
- SecureConversationSecurityTokenParameters.cs
- CodeVariableDeclarationStatement.cs
- CompressedStack.cs
- Atom10FeedFormatter.cs
- StrokeCollection.cs
- LoginView.cs
- CustomAttributeBuilder.cs
- BitmapMetadataEnumerator.cs
- MaterialGroup.cs
- BamlLocalizableResource.cs
- BitmapCodecInfoInternal.cs
- EncoderReplacementFallback.cs