public void Add(object item) { InnerList.Add(item); }
public bool MoveNext() { GlobalDebug.WriteLineIf(GlobalDebug.Info, "RangeRetriever", "Entering MoveNext"); if (_endReached) { return(false); } // Determine if we have already visited the current object. if (_currentIndex < InnerList.Count) { _currentResult = InnerList[_currentIndex]; _currentIndex++; return(true); } else if (_cacheFilled) { // We have just walked the entire cache. No need to visit the directory // since we cached everything that is out there. return(false); } if (!_endReached && _currentEnumerator == null) { // First time we're being called GlobalDebug.WriteLineIf(GlobalDebug.Info, "RangeRetriever", "MoveNext: first time"); _currentEnumerator = GetNextChunk(); if (_currentEnumerator == null) { GlobalDebug.WriteLineIf(GlobalDebug.Info, "RangeRetriever", "MoveNext: got null enumerator for first time"); _endReached = true; } } if (_endReached) { return(false); } bool needToRetry; bool f; do { needToRetry = false; f = _currentEnumerator.MoveNext(); if (f) { // Got a result, prepare to return it _currentResult = _currentEnumerator.Current; GlobalDebug.WriteLineIf(GlobalDebug.Info, "RangeRetriever", "MoveNext: got a result '{0}'", _currentResult.ToString()); } else { // Ran out of results in this range, try the next chunk GlobalDebug.WriteLineIf(GlobalDebug.Info, "RangeRetriever", "MoveNext: retrieving next range"); _currentEnumerator = GetNextChunk(); if (_currentEnumerator == null) { // No more chunks remain GlobalDebug.WriteLineIf(GlobalDebug.Info, "RangeRetriever", "MoveNext: end reached"); _endReached = true; _cacheFilled = _cacheValues; //Set cachedFilled boolean to cacheValues flags. } else { // Got the next chunk, try pulling a result out of it needToRetry = true; } } }while (needToRetry); if (f) { if (_cacheValues) { InnerList.Add(_currentResult); } _currentIndex++; } return(f); }
public IChannel Add(IChannel value) { InnerList.Add(value); return(value); }
/// <summary> /// Add element. /// </summary> /// <param name="value"></param> /// <returns></returns> public int Add(IErrorSet value) { return(InnerList.Add(value)); }
internal void BringWindowToFront(FloatWindow fw) { InnerList.Remove(fw); InnerList.Add(fw); }
private int Add(ReplicationCursor cursor) { return(InnerList.Add(cursor)); }
public int Add(Automobil automobil) { return(InnerList.Add(automobil)); }
internal int Add(ReplicationConnection value) => InnerList.Add(value);
public int Add(LineItem item) { return(InnerList.Add(item)); }
public int Add(RAW_DATA value) { return(InnerList.Add(value)); }
/// <summary> /// Add new filter to the sequence. /// </summary> /// /// <param name="filter">Filter to add to the sequence.</param> /// public void Add(IFilter filter) { InnerList.Add(filter); }
public void Add(AnalyticsRule r) { InnerList.Add(r); }
protected void Add(string netName, string path, ShareType shareType, string remark) { InnerList.Add(new Share(_server, netName, path, shareType, remark)); }
protected void Add(Share share) { InnerList.Add(share); }
internal void AddDirect(EventLogPermissionEntry value) { InnerList.Add(value); }
// ------------------ Public Methods -------------------- /// <summary> Populate the collection by looking for commonly implemented property pages. </summary> protected void addFromGraph( ICaptureGraphBuilder2 graphBuilder, IBaseFilter videoDeviceFilter, IBaseFilter audioDeviceFilter, IBaseFilter videoCompressorFilter, IBaseFilter audioCompressorFilter, SourceCollection videoSources, SourceCollection audioSources) { object filter = null; Guid cat; Guid med; Guid iid; int hr; Trace.Assert(graphBuilder != null); // 1. the video capture filter addIfSupported(videoDeviceFilter, "Video Capture Device"); // 2. the video capture pin cat = PinCategory.Capture; med = MediaType.Interleaved; iid = typeof(IAMStreamConfig).GUID; hr = graphBuilder.FindInterface( ref cat, ref med, videoDeviceFilter, ref iid, out filter); if (hr != 0) { med = MediaType.Video; hr = graphBuilder.FindInterface( ref cat, ref med, videoDeviceFilter, ref iid, out filter); if (hr != 0) { filter = null; } } addIfSupported(filter, "Video Capture Pin"); // 3. the video preview pin cat = PinCategory.Preview; med = MediaType.Interleaved; iid = typeof(IAMStreamConfig).GUID; hr = graphBuilder.FindInterface( ref cat, ref med, videoDeviceFilter, ref iid, out filter); if (hr != 0) { med = MediaType.Video; hr = graphBuilder.FindInterface( ref cat, ref med, videoDeviceFilter, ref iid, out filter); if (hr != 0) { filter = null; } } addIfSupported(filter, "Video Preview Pin"); // 4. the video crossbar(s) ArrayList crossbars = new ArrayList(); int num = 1; for (int c = 0; c < videoSources.Count; c++) { CrossbarSource s = videoSources[c] as CrossbarSource; if (s != null) { if (crossbars.IndexOf(s.Crossbar) < 0) { crossbars.Add(s.Crossbar); if (addIfSupported(s.Crossbar, "Video Crossbar " + (num == 1 ? "" : num.ToString()))) { num++; } } } } crossbars.Clear(); // 5. the video compressor addIfSupported(videoCompressorFilter, "Video Compressor"); // 6. the video TV tuner cat = PinCategory.Capture; med = MediaType.Interleaved; iid = typeof(IAMTVTuner).GUID; hr = graphBuilder.FindInterface( ref cat, ref med, videoDeviceFilter, ref iid, out filter); if (hr != 0) { med = MediaType.Video; hr = graphBuilder.FindInterface( ref cat, ref med, videoDeviceFilter, ref iid, out filter); if (hr != 0) { filter = null; } } addIfSupported(filter, "TV Tuner"); // 7. the video compressor (VFW) IAMVfwCompressDialogs compressDialog = videoCompressorFilter as IAMVfwCompressDialogs; if (compressDialog != null) { VfwCompressorPropertyPage page = new VfwCompressorPropertyPage("Video Compressor", compressDialog); InnerList.Add(page); } // 8. the audio capture filter addIfSupported(audioDeviceFilter, "Audio Capture Device"); // 9. the audio capture pin cat = PinCategory.Capture; med = MediaType.Audio; iid = typeof(IAMStreamConfig).GUID; hr = graphBuilder.FindInterface( ref cat, ref med, audioDeviceFilter, ref iid, out filter); if (hr != 0) { filter = null; } addIfSupported(filter, "Audio Capture Pin"); // 9. the audio preview pin cat = PinCategory.Preview; med = MediaType.Audio; iid = typeof(IAMStreamConfig).GUID; hr = graphBuilder.FindInterface( ref cat, ref med, audioDeviceFilter, ref iid, out filter); if (hr != 0) { filter = null; } addIfSupported(filter, "Audio Preview Pin"); // 10. the audio crossbar(s) num = 1; for (int c = 0; c < audioSources.Count; c++) { CrossbarSource s = audioSources[c] as CrossbarSource; if (s != null) { if (crossbars.IndexOf(s.Crossbar) < 0) { crossbars.Add(s.Crossbar); if (addIfSupported(s.Crossbar, "Audio Crossbar " + (num == 1 ? "" : num.ToString()))) { num++; } } } } crossbars.Clear(); // 11. the audio compressor addIfSupported(audioCompressorFilter, "Audio Compressor"); }
internal int Add(Domain domain) => InnerList.Add(domain);
internal int Add(ActiveDirectorySite site) => InnerList.Add(site);
/// <summary> /// Add an object to the collection /// </summary> /// <param name="sector"></param> public virtual void Add(LBMeterThreshold sector) { InnerList.Add(sector); }
public int Add(Glyph value) { return(InnerList.Add(value)); }
public void Add(PointF p) { InnerList.Add(p); }
/// <summary> /// Populate the InnerList with a list of filters from a particular category /// </summary> protected void GetFilters(Guid category) { int hr; object comObj = null; ICreateDevEnum enumDev = null; UCOMIEnumMoniker enumMon = null; var mon = new UCOMIMoniker[1]; try { // Get the system device enumerator Type srvType = Type.GetTypeFromCLSID(Uuid.Clsid.SystemDeviceEnum); if (srvType == null) { throw new NotImplementedException("System Device Enumerator"); } comObj = Activator.CreateInstance(srvType); enumDev = (ICreateDevEnum)comObj; // Create an enumerator to find filters in category hr = enumDev.CreateClassEnumerator(ref category, out enumMon, 0); if (hr != 0) { return; } //throw new NotSupportedException("No devices of the category"); // Loop through the enumerator int f; do { // Next filter hr = enumMon.Next(1, mon, out f); if ((hr != 0) || (mon[0] == null)) { break; } // Add the filter var filter = new Filter(mon[0]); InnerList.Add(filter); // Release resources Marshal.ReleaseComObject(mon[0]); mon[0] = null; } while (true); // Sort InnerList.Sort(); } finally { enumDev = null; if (mon[0] != null) { Marshal.ReleaseComObject(mon[0]); } mon[0] = null; if (enumMon != null) { Marshal.ReleaseComObject(enumMon); } enumMon = null; if (comObj != null) { Marshal.ReleaseComObject(comObj); } comObj = null; } }
public void Add(Person person) { InnerList.Add(person); }
// public methods... /// <summary> /// Adds file offset to the collection. /// </summary> /// <param name="offset">The offset to add.</param> public int Add(FileOffset offset) { return(InnerList.Add(offset)); }
/// <summary> /// Add /// </summary> /// <param name="t">The t.</param> /// <returns></returns> public int Add(PageStripDetails t) { return(InnerList.Add(t)); }
/// <summary> /// Adds the attribute to the collection. /// </summary> public void Add(WixXmlAttribute attribute) { InnerList.Add(attribute); }
public int Add(Url newUrl) { return(InnerList.Add(newUrl)); }
public void Add(ServiceThread thread) { InnerList.Add(thread); }
/// <summary> /// <para>Appends a <see cref="ValidationError"/> to the end of the collection.</para> /// </summary> /// <param name="validationError"> /// <para>The <see cref="ValidationError"/> to add.</para> /// </param> public void Add(ValidationError validationError) { InnerList.Add(validationError); }
public int Add(TalkRef value) { return(InnerList.Add(value)); }