Here are the examples of the csharp api System.Collections.Generic.ICollection.Contains(uint) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
5 Examples
19
Source : AlbionPalette.cs
with MIT License
from csinkers
with MIT License
from csinkers
static uint Search(uint root, ISet<uint> visited)
{
var queue = new Queue<uint>();
queue.Enqueue(root);
do
{
var entry = queue.Dequeue();
if (!visited.Contains(entry))
return entry;
var (r, g, b, a) = ApiUtil.UnpackColor(entry);
if (r < 255) queue.Enqueue(ApiUtil.PackColor((byte)(r + 1), g, b, a));
if (g < 255) queue.Enqueue(ApiUtil.PackColor(r, (byte)(g + 1), b, a));
if (b < 255) queue.Enqueue(ApiUtil.PackColor(r, g, (byte)(b + 1), a));
if (r > 0) queue.Enqueue(ApiUtil.PackColor((byte)(r - 1), g, b, a));
if (g > 0) queue.Enqueue(ApiUtil.PackColor(r, (byte)(g - 1), b, a));
if (b > 0) queue.Enqueue(ApiUtil.PackColor(r, g, (byte)(b - 1), a));
} while (queue.Count > 0);
throw new InvalidOperationException($"Could not find an empty palette slot for {root:x}");
}
19
Source : DicomDataParameter.cs
with Apache License 2.0
from DICOMcloud
with Apache License 2.0
from DICOMcloud
public virtual bool IsSupported(DicomItem element) {
if ( null != SupportedTags && SupportedTags.Count > 0 )
{
return SupportedTags.Contains ( (uint) element.Tag ) ;
}
return true ;
}
19
Source : ShadeSupport.cs
with GNU General Public License v3.0
from FanTranslatorsInternational
with GNU General Public License v3.0
from FanTranslatorsInternational
public static string GuessExtension(Stream input)
{
var magicSamples = CollectMagicSamples(input);
if (magicSamples.Contains(0x55AA382D))
return "arc";
if (magicSamples.Contains(0x52415344))
return "rasd";
if (magicSamples.Contains(0x53485458))
return "shtx";
if (magicSamples.Contains(0x53534144))
return "ssad";
if (magicSamples.Contains(0x434d504b))
return "cpmk";
if (magicSamples.Contains(StringToUInt32("bres")))
return "bres";
return "bin";
}
19
Source : IdSelection.cs
with GNU General Public License v3.0
from Washi1337
with GNU General Public License v3.0
from Washi1337
public override bool Contains(uint id)
{
return IncludedIds.Contains(id);
}
19
Source : IdSelection.cs
with GNU General Public License v3.0
from Washi1337
with GNU General Public License v3.0
from Washi1337
public override bool Contains(uint id)
{
return !ExcludedIds.Contains(id);
}