Profiles.ORNG.Utilities.OpenSocialManager.RemoveGadget C# (CSharp) Method

RemoveGadget() public method

public RemoveGadget ( string label ) : void
label string
return void
        public void RemoveGadget(string label)
        {
            // if any visible gadgets depend on pubsub data that isn't present, throw them out
            PreparedGadget gadgetToRemove = null;
            foreach (PreparedGadget gadget in gadgets)
            {
                if (label.Equals(gadget.GetLabel()))
                {
                    gadgetToRemove = gadget;
                    break;
                }
            }
            gadgets.Remove(gadgetToRemove);
        }