Ejemplo n.º 1
0
        public ICodeWriter Scope(ScopeIdentifier scopeIdentifier)
        {
            switch (scopeIdentifier)
            {
            case ScopeIdentifier.Public:
                Write(CSharpKeyword.Public);
                break;

            case ScopeIdentifier.Internal:
                Write(CSharpKeyword.Internal);
                break;

            case ScopeIdentifier.Protected:
                Write(CSharpKeyword.Protected);
                break;

            case ScopeIdentifier.Private:
                Write(CSharpKeyword.Private);
                break;

            default:
                throw new InvalidOperationException($"Unimplemented scope identifier {scopeIdentifier}");
            }

            return(this);
        }
Ejemplo n.º 2
0
 public RompScopedLogger(RompExecutionEnvironment executer, ScopeIdentifier current, ActiveNamedScope parent, IEnumerable <IMessage> initialMessages = null)
     : base(current, parent)
 {
     this.executer        = executer;
     this.initialMessages = initialMessages;
 }
Ejemplo n.º 3
0
 public ActiveNamedScope CreateLogScope(ScopeIdentifier current, ActiveNamedScope parent) => new RompScopedLogger(this, current, parent);