internal static IEnumerable <KeyValuePair <string, string> > ToParameters(this ViewDeleteCriteria criteria)
        {
            var builder = new ParameterBuilder();

            if (criteria?.Cascade != null && (criteria.Cascade & ViewCascadeOptions.CascadeSessions) != 0)
            {
                builder.Add("cascade", "sessions");
            }
            return(builder.GetParameters());
        }
예제 #2
0
        internal static IEnumerable <KeyValuePair <string, string> > ToParameters(this ViewDeleteCriteria criteria)
        {
            var builder = new ParameterBuilder();

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

            return(builder.GetParameters());
        }