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

GetGadgetByPropertyURI() public static method

public static GetGadgetByPropertyURI ( string propertyURI ) : Profiles.ORNG.Utilities.GadgetSpec
propertyURI string
return Profiles.ORNG.Utilities.GadgetSpec
        public static GadgetSpec GetGadgetByPropertyURI(string propertyURI)
        {
            foreach (GadgetSpec spec in GetAllDBGadgets(true).Values)
            {
                if (propertyURI.Equals(ORNG_ONTOLOGY_PREFIX + "has" + spec.GetFileName()))
                {
                    return spec;
                }
            }
            return null;
        }

Usage Example

Example #1
0
        public void RemovePersonalGadget(long Subject, string propertyURI)
        {
            GadgetSpec spec = OpenSocialManager.GetGadgetByPropertyURI(propertyURI);

            if (spec != null)
            {
                RemovePersonalGadget(Subject, spec.GetAppId());
            }
        }