/// <summary> /// Initializes a new instance of the <see cref="TargetGroup"/> class. /// </summary> /// <param name="session"><see cref="T:TcmCoreService.Client" /></param> /// <param name="targetGroupData"><see cref="T:Tridion.ContentManager.CoreService.Client.TargetGroupData" /></param> protected TargetGroup(Client client, TargetGroupData targetGroupData) : base(client, targetGroupData) { if (targetGroupData == null) throw new ArgumentNullException("targetGroupData"); mTargetGroupData = targetGroupData; }
/// <summary> /// Initializes a new instance of the <see cref="TargetGroup"/> class. /// </summary> /// <param name="session"><see cref="T:TcmCoreService.Client" /></param> /// <param name="targetGroupData"><see cref="T:Tridion.ContentManager.CoreService.Client.TargetGroupData" /></param> protected TargetGroup(Client client, TargetGroupData targetGroupData) : base(client, targetGroupData) { if (targetGroupData == null) { throw new ArgumentNullException("targetGroupData"); } mTargetGroupData = targetGroupData; }
/// <summary> /// Reload the <see cref="TargetGroup" /> with the specified <see cref="T:Tridion.ContentManager.CoreService.Client.TargetGroupData" /> /// </summary> /// <param name="targetGroupData"><see cref="T:Tridion.ContentManager.CoreService.Client.TargetGroupData" /></param> protected void Reload(TargetGroupData targetGroupData) { if (targetGroupData == null) { throw new ArgumentNullException("targetGroupData"); } mTargetGroupData = targetGroupData; base.Reload(targetGroupData); }
public static TargetGroupResult From(TargetGroupData item, string currentUserId) { int count = item.Conditions.Count(); var result = new TargetGroupResult { Description = TextEntry.From(item.Description, Resources.LabelDescription), MetadataSchema = LinkEntry.From(item.MetadataSchema, Resources.LabelMetadataSchema, currentUserId), Conditions = TextEntry.From(count > 0 ? count.ToString(CultureInfo.InvariantCulture) : Resources.None, Resources.LabelConditions) }; AddCommonProperties(item, result); AddPropertiesForRepositoryLocalObject(item, result, currentUserId); return(result); }
public static TargetGroupResult From(TargetGroupData item, string currentUserId) { int count = item.Conditions.Count(); var result = new TargetGroupResult { Description = TextEntry.From(item.Description, Resources.LabelDescription), MetadataSchema = LinkEntry.From(item.MetadataSchema, Resources.LabelMetadataSchema, currentUserId), Conditions = TextEntry.From(count > 0 ? count.ToString(CultureInfo.InvariantCulture) : Resources.None, Resources.LabelConditions) }; AddCommonProperties(item, result); AddPropertiesForRepositoryLocalObject(item, result, currentUserId); return result; }
/// <summary> /// Reload the <see cref="TargetGroup" /> with the specified <see cref="T:Tridion.ContentManager.CoreService.Client.TargetGroupData" /> /// </summary> /// <param name="targetGroupData"><see cref="T:Tridion.ContentManager.CoreService.Client.TargetGroupData" /></param> protected void Reload(TargetGroupData targetGroupData) { if (targetGroupData == null) throw new ArgumentNullException("targetGroupData"); mTargetGroupData = targetGroupData; base.Reload(targetGroupData); }