public Buffer GetByFullPath(BufferTag tags, string fullPath) { foreach (Buffer buffer in list) { if (buffer.FullPath == fullPath && (buffer.tags & tags) == tags) { return(buffer); } } return(null); }
public Buffer GetSelectedBuffer(BufferTag tags) { Frame frame = GetFocusedFrame(); if (frame != null) { for (Nest nestI = frame.Nest; nestI != null; nestI = nestI.Child) { if (nestI.Frame != null && nestI.Frame.SelectedBuffer != null && (nestI.Frame.SelectedBuffer.tags & tags) == tags) { return(nestI.Frame.SelectedBuffer); } } } return(null); }
public IEnumerable <Buffer> GetBuffers(BufferTag tags) { for (Nest nestI = list.Head; nestI != null; nestI = nestI.Child) { if (nestI.buffers != null) { for (int i = 0, count = nestI.buffers.list.Count; i < count; i++) { Buffer buffer = nestI.buffers.list[i]; if ((buffer.tags & tags) == tags) { yield return(buffer); } } } } }