コード例 #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);
        }
コード例 #2
0
 public RompScopedLogger(RompExecutionEnvironment executer, ScopeIdentifier current, ActiveNamedScope parent, IEnumerable <IMessage> initialMessages = null)
     : base(current, parent)
 {
     this.executer        = executer;
     this.initialMessages = initialMessages;
 }
コード例 #3
0
 public ActiveNamedScope CreateLogScope(ScopeIdentifier current, ActiveNamedScope parent) => new RompScopedLogger(this, current, parent);