public override bool Equals(object obj) { TemplateVersion templateVersion = obj as TemplateVersion; if (templateVersion == null) { throw new Exception("Object is not a TemplateVersion"); } return(this.ID == templateVersion.ID); }
/// <summary> /// 添加一个View至当前模板版本 /// </summary> /// <param name="view"></param> public void AddVersion(TemplateVersion version) { version.ID = MaxVersion + 1; this.VersionList.Add(version); }