Exemplo n.º 1
0
        public static IDimensions Add(string name, IDimensions dims)
        {
            if (dict.ContainsKey(name))
            {
                throw new ArgumentException("GlobalDimension " + name + " is already defined");
            }
            IDimensions newdims = new GlobalDimensions(name, dims.Factors);

            dict.Add(name, newdims);
            return(newdims);
        }
Exemplo n.º 2
0
        public static IDimensions get(string name)
        {
            IDimensions dims = null;

            if (dict.TryGetValue(name, out dims))
            {
                return(dims);
            }

            dims = new GlobalDimensions(name);
            dict.Add(name, dims);
            return(dims);
        }