public ModelValueNodeAdapter(IModelNodeAdapterParent parent, IModelValueNode model) : base(parent)
 {
     this.model = model;
 }
示例#2
0
 public static ModelNodeBaseAdapter GetAdapter(IModelNodeAdapterParent parent, INodeBase node)
 {
     return(ModelNodeBaseAdapter.cache.GetObject(new ObjectCacheKey <IModelNodeAdapterParent, INodeBase>(parent, node), parent, node));
 }
示例#3
0
 protected ModelNodeBaseAdapter(IModelNodeAdapterParent parent)
 {
     this.Parent = parent;
 }
示例#4
0
 private static ModelNodeBaseAdapter CreateAdapters(ObjectCacheKey <IModelNodeAdapterParent, INodeBase> cacheKey, IModelNodeAdapterParent parent, INodeBase node)
 {
     if (node is IModelComplexNode)
     {
         return(new ModelComplexNodeAdapter(parent, (IModelComplexNode)node));
     }
     else if (node is IModelValueNode)
     {
         return(new ModelValueNodeAdapter(parent, (IModelValueNode)node));
     }
     else if (node is IModelEnumerableNode)
     {
         return(new ModelEnumerableNodeAdapter(parent, (IModelEnumerableNode)node));
     }
     else if (node is IPropertyNode)
     {
         return(new ModelPropertyNodeAdapter(parent, (IPropertyNode)node));
     }
     else if (node is IEnumerationItemNode)
     {
         return(new ModelEnumerationItemNodeAdapter(parent, (IEnumerationItemNode)node));
     }
     else
     {
         throw new ArgumentException();
     }
 }
 public ModelEnumerableNodeAdapter(IModelNodeAdapterParent parent, IModelEnumerableNode model) : base(parent)
 {
     this.model = model;
 }
示例#6
0
 public ModelPropertyNodeAdapter(IModelNodeAdapterParent parent, IPropertyNode propertyNode) : base(parent)
 {
     this.propertyNode = propertyNode;
 }
 public ModelEnumerationItemNodeAdapter(IModelNodeAdapterParent parent, IEnumerationItemNode enumerationItem) : base(parent)
 {
     this.enumerationItem = enumerationItem;
 }
 public ModelComplexNodeAdapter(IModelNodeAdapterParent parent, IModelComplexNode model) : base(parent)
 {
     this.model = model;
 }