private PersistenceSettings(PersistenceSettings settings) { if (settings != null) { this.Copy(settings); } else { this.defaultXmlnsPrefixes = new Dictionary <IXmlNamespace, string>(); } }
public XamlSerializerContext(PersistenceSettings persistenceSettings, IDocumentContext documentContext, CultureInfo cultureInfo, IAssembly projectAssembly, bool removeProjectRootFromUri) { this.persistenceSettings = persistenceSettings; this.documentContext = documentContext; this.cultureInfo = cultureInfo; this.root = new RootNode(); this.container = (ContainerNode)this.root; this.clrNamespaceUriParseCache = new ClrNamespaceUriParseCache(this.TypeResolver); this.clrNamespaceUriSerializeCache = new XamlSerializerContext.ClrNamespaceUriSerializeCache(this.documentContext, projectAssembly); this.removeProjectRootFromUri = removeProjectRootFromUri; }
private void Copy(PersistenceSettings settings) { this.attributeQuoteCharacter = settings.attributeQuoteCharacter; this.markupExtensionQuoteCharacter = settings.markupExtensionQuoteCharacter; this.indentString = settings.indentString; this.attributeIndentString = settings.attributeIndentString; this.spacesPerTabStop = settings.spacesPerTabStop; this.customXmlnsPrefix = settings.customXmlnsPrefix; this.emptyXmlnsPrefixSubstitute = settings.emptyXmlnsPrefixSubstitute; this.lineLength = settings.lineLength; this.defaultXmlnsPrefixes = new Dictionary <IXmlNamespace, string>((IDictionary <IXmlNamespace, string>)settings.defaultXmlnsPrefixes); }
public XamlFormatter(PersistenceSettings settings, TextWriter writer, bool shouldUpdateSourceContext) { this.settings = settings; this.writer = new XamlFormatter.Writer(writer); this.shouldUpdateSourceContext = shouldUpdateSourceContext; }
internal XamlSerializerContext(PersistenceSettings persistenceSettings, IDocumentContext documentContext, CultureInfo cultureInfo) : this(persistenceSettings, documentContext, cultureInfo, documentContext.TypeResolver.ProjectAssembly, true) { }