// lazy singleton constructor public static BlauSpaceLatticeRegistry Instance() { if (_instance == null) { _instance = new BlauSpaceLatticeRegistry(); } return(_instance); }
internal void register(StreamingContext context) { if (LoggerDiags.Enabled) { SingletonLogger.Instance().InfoLog(typeof(BlauSpaceLattice), "BSL OnDeserialized ..."); } BlauSpaceLatticeRegistry.Instance().add(this); }
// 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); }
// proxy reference public Object GetRealObject(StreamingContext context) { BlauSpaceLattice s_validated = BlauSpaceLatticeRegistry.Instance().validate(this); return(s_validated); }