Beispiel #1
0
        internal static IEnumerable <KeyValuePair <string, string> > ToParameters(this DataSetRemoveCriteria criteria)
        {
            var builder = new ParameterBuilder();

            builder.Add("startDate", criteria?.StartDate);
            builder.Add("endDate", criteria?.EndDate);

            if ((criteria?.Options & DataSetDeleteOptions.CascadeSessions).GetValueOrDefault() != 0)
            {
                builder.Add("cascade", "session");
            }
            if ((criteria?.Options & DataSetDeleteOptions.CascadeViews).GetValueOrDefault() != 0)
            {
                builder.Add("cascade", "view");
            }
            if ((criteria?.Options & DataSetDeleteOptions.CascadeModels).GetValueOrDefault() != 0)
            {
                builder.Add("cascade", "model");
            }
            if ((criteria?.Options & DataSetDeleteOptions.CascadeVocabularies).GetValueOrDefault() != 0)
            {
                builder.Add("cascade", "vocabulary");
            }

            return(builder.GetParameters());
        }
        internal static IEnumerable <KeyValuePair <string, string> > ToParameters(this DataSetRemoveCriteria criteria)
        {
            var builder = new ParameterBuilder();

            builder.Add("startDate", criteria?.StartDate);
            builder.Add("endDate", criteria?.EndDate);

            if ((criteria?.Options & DataSetDeleteOptions.CascadeForecast) != 0)
            {
                builder.Add("cascade", "forecast");
            }
            if ((criteria?.Options & DataSetDeleteOptions.CascadeSessions) != 0)
            {
                builder.Add("cascade", "session");
            }
            if ((criteria?.Options & DataSetDeleteOptions.CascadeViews) != 0)
            {
                builder.Add("cascade", "view");
            }

            return(builder.GetParameters());
        }