public override IEnumerable <CachedObject> GetCachedObjects() { return(this.requestHandler.Storage.GetRepository <ICachedObjectRepository>().FilteredByCultureId(CultureManager.GetCurrentCulture(this.requestHandler.Storage).Id).Where(o => o.ClassId == int.Parse(this.args["ClassId"]))); }
public override IEnumerable <Object> GetObjects(IRequestHandler requestHandler, Object page, params KeyValuePair <string, string>[] args) { if (!this.HasArgument(args, "OrderBy") || !this.HasArgument(args, "Direction")) { if (this.HasArgument(args, "MemberId")) { return(requestHandler.Storage.GetRepository <IObjectRepository>().Primary(this.GetIntArgument(args, "MemberId"), page.Id)); } return(requestHandler.Storage.GetRepository <IObjectRepository>().Primary(page.Id)); } int orderBy = this.GetIntArgument(args, "OrderBy"); string direction = this.GetStringArgument(args, "Direction"); Member member = requestHandler.Storage.GetRepository <IMemberRepository>().WithKey(orderBy); DataType dataType = requestHandler.Storage.GetRepository <IDataTypeRepository>().WithKey((int)member.PropertyDataTypeId); if (this.HasArgument(args, "MemberId")) { return(requestHandler.Storage.GetRepository <IObjectRepository>().Primary(this.GetIntArgument(args, "MemberId"), page.Id, dataType.StorageDataType, orderBy, direction, CultureManager.GetCurrentCulture(requestHandler.Storage).Id)); } return(requestHandler.Storage.GetRepository <IObjectRepository>().Primary(page.Id, dataType.StorageDataType, orderBy, direction, CultureManager.GetCurrentCulture(requestHandler.Storage).Id)); }
public override IEnumerable <SerializedObject> GetSerializedObjects(IRequestHandler requestHandler, SerializedObject serializedPage, params KeyValuePair <string, string>[] args) { if (!this.HasArgument(args, "ClassId")) { return new SerializedObject[] { } } ; if (!this.HasArgument(args, "OrderBy") || !this.HasArgument(args, "Direction")) { return(requestHandler.Storage.GetRepository <ISerializedObjectRepository>().FilteredByClassId(CultureManager.GetCurrentCulture(requestHandler.Storage).Id, this.GetIntArgument(args, "ClassId"))); } int orderBy = this.GetIntArgument(args, "OrderBy"); string direction = this.GetStringArgument(args, "Direction"); Member member = requestHandler.Storage.GetRepository <IMemberRepository>().WithKey(orderBy); DataType dataType = requestHandler.Storage.GetRepository <IDataTypeRepository>().WithKey((int)member.PropertyDataTypeId); return(requestHandler.Storage.GetRepository <ISerializedObjectRepository>().FilteredByClassId(CultureManager.GetCurrentCulture(requestHandler.Storage).Id, this.GetIntArgument(args, "ClassId"), dataType.StorageDataType, orderBy, direction)); }
public string GetLocalizationValue(int dictionaryId) { return(this.GetLocalizationValue(dictionaryId, CultureManager.GetCurrentCulture(this.handler.Storage).Id)); }
public static string GetLocalizationValue(this IRequestHandler requestHandler, int dictionaryId) { return(requestHandler.GetLocalizationValue(dictionaryId, CultureManager.GetCurrentCulture(requestHandler.Storage).Id)); }