Пример #1
0
 // lazy singleton constructor
 public static BlauSpaceLatticeRegistry Instance()
 {
     if (_instance == null)
     {
         _instance = new BlauSpaceLatticeRegistry();
     }
     return(_instance);
 }
Пример #2
0
 internal void register(StreamingContext context)
 {
     if (LoggerDiags.Enabled)
     {
         SingletonLogger.Instance().InfoLog(typeof(BlauSpaceLattice), "BSL OnDeserialized ...");
     }
     BlauSpaceLatticeRegistry.Instance().add(this);
 }
Пример #3
0
        // public static factory method
        public static IBlauSpaceLattice create(IBlauSpace space, int[] steps)
        {
            BlauSpaceLattice s = new BlauSpaceLattice(space, steps);

            BlauSpaceLatticeRegistry.Instance().add(s);
            BlauSpaceLattice s_validated = BlauSpaceLatticeRegistry.Instance().validate(s);

            return(s_validated);
        }
Пример #4
0
        // proxy reference
        public Object GetRealObject(StreamingContext context)
        {
            BlauSpaceLattice s_validated = BlauSpaceLatticeRegistry.Instance().validate(this);

            return(s_validated);
        }