Esempio n. 1
0
 public PatternElement(PatternElementTypes type, PathPoint source, PathPoint target, string id)
 {
     m_type   = type;
     m_source = source;
     m_target = target;
     m_id     = id;
 }
Esempio n. 2
0
        protected PatternElement(PatternElement prototype)
        {
            if (prototype == null)
            {
                throw new ArgumentNullException(nameof(prototype));
            }

            m_type   = prototype.m_type;
            m_source = prototype.m_source;
            m_target = prototype.m_target;
            m_id     = prototype.m_id;
        }
Esempio n. 3
0
        public PatternElement(JToken json)
        {
            if (json == null)
            {
                throw new ArgumentNullException(nameof(json));
            }

            m_type   = (PatternElementTypes)Enum.Parse(typeof(PatternElementTypes), (string)json[JsonNames.PatternElementType]);
            m_source = new PathPoint(json[JsonNames.Source]);
            m_target = new PathPoint(json[JsonNames.Target]);
            m_id     = json.Value <string>(JsonNames.Id);
        }