Exemple #1
0
        /**
         * Adds a TimeReference instance for the specified name.
         */
        public TimeReference Add(string name)
        {
            TimeReference newTimeReference = new TimeReference(name);

            instanceMap[name] = newTimeReference;
            return(newTimeReference);
        }
        /**
         * Returns a default instance that can be used by any class.
         */
        public static TimeReference GetDefaultInstance()
        {
            if (DEFAULT_INSTANCE == null)
            {
                DEFAULT_INSTANCE = new TimeReference("Default");
            }

            return(DEFAULT_INSTANCE);
        }
Exemple #3
0
        /**
         * Retrieves the TimeReference instance for this specified name.
         */
        public TimeReference Get(string name)
        {
            if (string.IsNullOrEmpty(name))
            {
                return(TimeReference.GetDefaultInstance());
            }

            Assertion.Assert(instanceMap.ContainsKey(name));
            return(instanceMap[name]);
        }
Exemple #4
0
 /**
  * Returns the default TimeReference instance.
  */
 public TimeReference GetDefault()
 {
     return(TimeReference.GetDefaultInstance());
 }