fork download
  1. public abstract class BaseComponent : MarshalByRefObject, IMessageHandler, IComponentManagement
  2. {
  3. private static readonly object _instanceLock = new object();
  4. private static volatile BaseComponent _instance;
  5. private static volatile string _name;
  6.  
  7. private BaseComponent()
  8. {
  9. throw new BaseComponentCreateException(String.Format(PrivateErrors.BaseComponentPrivateConstructorError));
  10. }
  11.  
  12. protected BaseComponent(string name)
  13. {
  14. _name = name;
  15.  
  16. if (_instance == null)
  17. {
  18. lock (_instanceLock)
  19. {
  20. if (_instance == null)
  21. {
  22. _instance = this;
  23. }
  24. }
  25. }
  26. else
  27. {
  28. throw new BaseComponentCreateException(String.Format(PrivateErrors.BaseComponentConstructorError));
  29. }
  30. }
  31.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cs(31,1): error CS8025: Parsing error
Compilation failed: 1 error(s), 0 warnings
stdout
Standard output is empty