Here are the examples of the csharp api System.Collections.Generic.HashSet.Contains(VisualObject) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
4 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();
}
19
Source : SelectionContext.cs
with MIT License
from Macad3D
with MIT License
from Macad3D
public void UpdateAis()
{
// Update shapes
bool includeByDefault = _Options.HasFlag(Options.IncludeAll);
var visShapes = _WorkspaceController.VisualObjects.GetAll();
foreach (var visualShape in visShapes)
{
bool isInOrExcluded = _InOrExcludedShapes.Contains(visualShape);
UpdateShape(visualShape, includeByDefault ? !isInOrExcluded : isInOrExcluded);
}
}
19
Source : SelectionContext.cs
with MIT License
from Macad3D
with MIT License
from Macad3D
public void UpdateShape(VisualObject visualObject)
{
bool includeByDefault = _Options.HasFlag(Options.IncludeAll);
bool isInOrExcluded = _InOrExcludedShapes.Contains(visualObject);
UpdateShape(visualObject, includeByDefault ? !isInOrExcluded : isInOrExcluded);
}