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
- ServiceNameElementCollection.cs
- ArglessEventHandlerProxy.cs
- UiaCoreTypesApi.cs
- DetailsViewUpdateEventArgs.cs
- Selection.cs
- TypeElementCollection.cs
- DataErrorValidationRule.cs
- SmtpFailedRecipientException.cs
- odbcmetadatacollectionnames.cs
- ArraySortHelper.cs
- EventLogEntry.cs
- EventHandlersStore.cs
- TextBreakpoint.cs
- SqlHelper.cs
- CopyNodeSetAction.cs
- CodeNamespaceImport.cs
- ActiveDesignSurfaceEvent.cs
- StyleSheetDesigner.cs
- CompiledRegexRunner.cs
- SqlNotificationEventArgs.cs
- BasicHttpSecurity.cs
- ObjectItemCollection.cs
- XXXInfos.cs
- MethodAccessException.cs
- ToolStripContentPanelRenderEventArgs.cs
- HwndSourceParameters.cs
- ActivityStatusChangeEventArgs.cs
- ComEventsSink.cs
- ImageClickEventArgs.cs
- WindowsFont.cs
- MediaPlayerState.cs
- ApplyTemplatesAction.cs
- XmlSchemas.cs
- Control.cs
- CommandManager.cs
- ToolBarButton.cs
- MetabaseServerConfig.cs
- ProfileSection.cs
- InstanceNormalEvent.cs
- StopStoryboard.cs
- HtmlUtf8RawTextWriter.cs
- HttpDictionary.cs
- Point3DAnimation.cs
- Attribute.cs
- EntityDataSourceDataSelectionPanel.designer.cs
- DataGridViewRowStateChangedEventArgs.cs
- X509IssuerSerialKeyIdentifierClause.cs
- OleDbFactory.cs
- NameValuePermission.cs
- MasterPageParser.cs
- Debug.cs
- SmtpException.cs
- IInstanceContextProvider.cs
- TransactionContext.cs
- OutputScope.cs
- TrackingRecord.cs
- Composition.cs
- Debug.cs
- Panel.cs
- NonSerializedAttribute.cs
- GPStream.cs
- SettingsPropertyNotFoundException.cs
- SystemSounds.cs
- TextLine.cs
- XPathMessageFilterTable.cs
- GatewayDefinition.cs
- PixelFormats.cs
- TitleStyle.cs
- CheckBoxFlatAdapter.cs
- BitmapEffectGroup.cs
- FieldNameLookup.cs
- WindowsSecurityToken.cs
- SafeTimerHandle.cs
- HttpWebResponse.cs
- XmlSchemaExporter.cs
- TextDecorationLocationValidation.cs
- Duration.cs
- FacetDescriptionElement.cs
- SectionRecord.cs
- GC.cs
- ManagementException.cs
- ContentDisposition.cs
- StylusEventArgs.cs
- Italic.cs
- HtmlPanelAdapter.cs
- UxThemeWrapper.cs
- ExtendedProtectionPolicyElement.cs
- SQLInt16Storage.cs
- DataFormat.cs
- CultureTable.cs
- XmlLanguageConverter.cs
- SignerInfo.cs
- PeerDuplexChannelListener.cs
- XsltException.cs
- XPathAncestorQuery.cs
- _ProxyChain.cs
- WorkflowPersistenceContext.cs
- Expr.cs
- XmlSchemaSequence.cs
- StorageComplexTypeMapping.cs