Esempio n. 1
0
		protected XmlAccessor(Type clrType, IXmlContext context)
		{
			if (clrType == null)
				throw Error.ArgumentNull("clrType");
			if (context == null)
				throw Error.ArgumentNull("context");

			clrType         = clrType.NonNullable();
			this.clrType    = clrType;
			this.xsiType    = context.GetDefaultXsiType(clrType);
			this.serializer = XmlTypeSerializer.For(clrType);
			this.context    = context;
		}
		public XmlDefaultBehaviorAccessor(string name, Type type, IXmlContext context)
			: base(name, type, context) { }
		public XmlDefaultBehaviorAccessor(Type type, IXmlContext context)
			: base(type, context) { }
Esempio n. 4
0
		private void SetContext(IXmlContext value)
		{
			if (null == value)
				throw Error.ArgumentNull("value");

			context = value;
		}
Esempio n. 5
0
		protected IXmlContext CloneContext()
		{
			if (0 == (state & States.ConfiguredContext))
			{
				context = context.Clone();
				state |= States.ConfiguredContext;
			}
			return context;
		}
Esempio n. 6
0
		public XmlSelfAccessor(Type clrType, IXmlContext context)
			: base(clrType, context) { }