Пример #1
0
		public XamlObjectWriter (XamlSchemaContext schemaContext, XamlObjectWriterSettings settings)
		{
			if (schemaContext == null)
				throw new ArgumentNullException ("schemaContext");
			this.sctx = schemaContext;
			this.settings = settings ?? new XamlObjectWriterSettings ();
			var manager = new XamlWriterStateManager<XamlObjectWriterException, XamlObjectWriterException> (false);
			intl = new XamlObjectWriterInternal (this, sctx, manager);
		}
Пример #2
0
 private static object Load(XamlXmlReader reader)
 {
     var writerSettings = new XamlObjectWriterSettings();
     using (var writer = new XamlObjectWriter(context, writerSettings))
     {
         XamlServices.Transform(reader, writer);
         return writer.Result;
     }
 }
		public XamlObjectWriterSettings (XamlObjectWriterSettings settings)
			: base (settings)
		{
			var s = settings;
			#if !__MOBILE__ && !PCL
			AccessLevel = s.AccessLevel;
#endif
			AfterBeginInitHandler = s.AfterBeginInitHandler;
			AfterEndInitHandler = s.AfterEndInitHandler;
			AfterPropertiesHandler = s.AfterPropertiesHandler;
			BeforePropertiesHandler = s.BeforePropertiesHandler;
			ExternalNameScope = s.ExternalNameScope;
			IgnoreCanConvert = s.IgnoreCanConvert;
			PreferUnconvertedDictionaryKeys = s.PreferUnconvertedDictionaryKeys;
			RegisterNamesOnExternalNamescope = s.RegisterNamesOnExternalNamescope;
			RootObjectInstance = s.RootObjectInstance;
			SkipDuplicatePropertyCheck = s.SkipDuplicatePropertyCheck;
			SkipProvideValueOnRoot = s.SkipProvideValueOnRoot;
			XamlSetValueHandler = s.XamlSetValueHandler;
		}
        public XamlObjectWriterSettings(XamlObjectWriterSettings settings)
            : base(settings)
        {
            var s = settings;

                        #if !__MOBILE__ && !PCL
            AccessLevel = s.AccessLevel;
#endif
            AfterBeginInitHandler            = s.AfterBeginInitHandler;
            AfterEndInitHandler              = s.AfterEndInitHandler;
            AfterPropertiesHandler           = s.AfterPropertiesHandler;
            BeforePropertiesHandler          = s.BeforePropertiesHandler;
            ExternalNameScope                = s.ExternalNameScope;
            IgnoreCanConvert                 = s.IgnoreCanConvert;
            PreferUnconvertedDictionaryKeys  = s.PreferUnconvertedDictionaryKeys;
            RegisterNamesOnExternalNamescope = s.RegisterNamesOnExternalNamescope;
            RootObjectInstance               = s.RootObjectInstance;
            SkipDuplicatePropertyCheck       = s.SkipDuplicatePropertyCheck;
            SkipProvideValueOnRoot           = s.SkipProvideValueOnRoot;
            XamlSetValueHandler              = s.XamlSetValueHandler;
        }