Пример #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) { }
Пример #4
0
		private void SetContext(IXmlContext value)
		{
			if (null == value)
				throw Error.ArgumentNull("value");

			context = value;
		}
Пример #5
0
		protected IXmlContext CloneContext()
		{
			if (0 == (state & States.ConfiguredContext))
			{
				context = context.Clone();
				state |= States.ConfiguredContext;
			}
			return context;
		}
Пример #6
0
		public XmlSelfAccessor(Type clrType, IXmlContext context)
			: base(clrType, context) { }