Here are the examples of the csharp api System.Collections.Generic.HashSet.Add(VisualObject) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
2 Examples
19
Source : SelectionContext.cs
with MIT License
from Macad3D
with MIT License
from Macad3D
public void Include(VisualObject visObject)
{
if (_Options.HasFlag(Options.IncludeAll))
{
if (_InOrExcludedShapes.Contains(visObject))
{
_InOrExcludedShapes.Remove(visObject);
_RaiseParametersChanged();
}
return;
}
if (_InOrExcludedShapes.Contains(visObject))
return;
_InOrExcludedShapes.Add(visObject);
_RaiseParametersChanged();
}
19
Source : SelectionContext.cs
with MIT License
from Macad3D
with MIT License
from Macad3D
public void Exclude(VisualObject visObject)
{
if (!_Options.HasFlag(Options.IncludeAll))
{
if (_InOrExcludedShapes.Contains(visObject))
{
_InOrExcludedShapes.Remove(visObject);
_RaiseParametersChanged();
}
return;
}
if (_InOrExcludedShapes.Contains(visObject))
return;
_InOrExcludedShapes.Add(visObject);
_RaiseParametersChanged();
}