Exemplo n.º 1
0
            StringBuilder GetBuilder(YVisibility visibility, BuilderId.BuilderType type)
            {
                // Note: a lot of calls to 'new'

                var id = new BuilderId(visibility, type);

                if (_builders.ContainsKey(id))
                {
                    return(_builders[id]);
                }

                var builder = new StringBuilder();

                _builders[id] = builder;
                return(builder);
            }
Exemplo n.º 2
0
 public bool Equals(BuilderId builderId)
 {
     return(builderId != null && builderId.visibility == visibility && builderId.type == type);
 }