public static GuidanceItem newGuidanceItemObject(Guid id, string title, Guid guidanceType, Guid library, Guid creator, string creatorCaption, string content, string images, DateTime lastUpdate) { var guidanceItem = new GuidanceItem { id =id.str(), title = title, guidanceType = guidanceType.str(), library = library.str(), creator = creator.str(), creatorCaption = creatorCaption, content = content, images = images, lastUpdate = lastUpdate }; return guidanceItem; }
public GuidanceItem_V3(GuidanceItem guidanceItem) { guidanceItemId = guidanceItem.id.guid(); guidanceItemId_Original = guidanceItem.id_original.guid(); libraryId = guidanceItem.library.guid(); guidanceType = guidanceItem.guidanceType.guid(); creatorId = guidanceItem.creator.guid(); creatorCaption = guidanceItem.creatorCaption; title = guidanceItem.title; images = guidanceItem.images; // lastUpdate = guidanceItem.lastUpdate; delete = guidanceItem.delete; htmlContent = guidanceItem.content.sanitizeHtmlContent(); //use reflection to set these values foreach(var attribute in guidanceItem.AnyAttr) this.prop(attribute.Name.lowerCaseFirstLetter(), attribute.Value); }
public GuidanceItem_V3(GuidanceItem guidanceItem) { guidanceItemId = guidanceItem.id.guid(); guidanceItemId_Original = guidanceItem.id_original.guid(); libraryId = guidanceItem.library.guid(); guidanceType = guidanceItem.guidanceType.guid(); creatorId = guidanceItem.creator.guid(); creatorCaption = guidanceItem.creatorCaption; title = guidanceItem.title; images = guidanceItem.images; // lastUpdate = guidanceItem.lastUpdate; delete = guidanceItem.delete; htmlContent = guidanceItem.content.sanitizeHtmlContent(); //use reflection to set these values foreach (var attribute in guidanceItem.AnyAttr) { this.prop(attribute.Name.lowerCaseFirstLetter(), attribute.Value); } }