Ejemplo n.º 1
0
 public static Dictionary <PlacesParametersType, string> SetParameter(
     this Dictionary <PlacesParametersType, string> parameters,
     PlacesParametersType type,
     IEnumerable <string> strings)
 {
     return(SetParameter(parameters, type, string.Join(",", strings)));
 }
Ejemplo n.º 2
0
 public static Dictionary <PlacesParametersType, string> SetParameter(
     this Dictionary <PlacesParametersType, string> parameters,
     PlacesParametersType type,
     int value)
 {
     return(SetParameter(parameters, type, value.ToString()));
 }
Ejemplo n.º 3
0
 public static Dictionary <PlacesParametersType, string> SetParameter(
     this Dictionary <PlacesParametersType, string> parameters,
     PlacesParametersType type,
     IParameter value)
 {
     return(SetParameter(parameters, type, value.AsString));
 }
Ejemplo n.º 4
0
        public static Dictionary <PlacesParametersType, string> SetParameter(
            this Dictionary <PlacesParametersType, string> parameters,
            PlacesParametersType type,
            IEnumerable <Tags> tags)
        {
            var strTargs = tags.Select(x => x.ToString());

            return(SetParameter(parameters, type, string.Join(",", strTargs)));
        }
Ejemplo n.º 5
0
        private static Dictionary <PlacesParametersType, string> SetParameter(
            this Dictionary <PlacesParametersType, string> parameters,
            PlacesParametersType type,
            string value)
        {
            var str = $"{type.ToString()}={value}";

            if (parameters.ContainsKey(type))
            {
                parameters[type] = str;
            }
            else
            {
                parameters.Add(type, str);
            }
            return(parameters);
        }