public void StopShred(Shred shred) { bool isRunning; using (ShredHostClient client = new ShredHostClient()) { isRunning = client.StopShred(shred.GetWcfDataShred()); } int indexCurrentShred = this.ShredCollection.Items.FindIndex(delegate(Shred otherShred) { return(otherShred.Id == shred.Id); }); this.ShredCollection.Items[indexCurrentShred].IsRunning = isRunning; this.ShredCollection.Items.NotifyItemUpdated(indexCurrentShred); }
public override bool Equals(object obj) { Shred otherShred = obj as Shred; if (null == otherShred) { return(false); } else if (this == otherShred) { return(true); } else if (this.Id == otherShred.Id) { return(true); } else { return(false); } }
public void StopShred(Shred shred) { _component.StopShred(shred); }