public PatternElement(PatternElementTypes type, PathPoint source, PathPoint target, string id) { m_type = type; m_source = source; m_target = target; m_id = id; }
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; }
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); }