SimpleFramework.Xml.Core.ArrayFactory.GetInstance C# (CSharp) 메소드

GetInstance() 공개 메소드

public GetInstance ( InputNode node ) : Instance
node InputNode /// this is the input node for the array element ///
리턴 Instance
      public Instance GetInstance(InputNode node) {
         Value value = getOverride(node);
         if(value == null) {
            throw new ElementException("Array length required for %s", type);
         }
         Class type = value.getType();
         return GetInstance(value, type);
      }
      /// <summary>

Same methods

ArrayFactory::GetInstance ( Value value, Class type ) : Instance

Usage Example

예제 #1
0
        /// <summary>
        /// This <c>read</c> method will read the XML element list from
        /// the provided node and deserialize its children as entry types.
        /// This ensures each entry type is deserialized as a root type, that
        /// is, its <c>Root</c> annotation must be present and the
        /// name of the entry element must match that root element name.
        /// </summary>
        /// <param name="node">
        /// this is the XML element that is to be deserialized
        /// </param>
        /// <returns>
        /// this returns the item to attach to the object contact
        /// </returns>
        public Object Read(InputNode node)
        {
            Instance type = factory.GetInstance(node);
            Object   list = type.Instance;

            if (!type.isReference())
            {
                return(Read(node, list));
            }
            return(list);
        }