public XrmButtonViewModel GetButton(string id)
 {
     if (CustomFunctions.Any(b => b.Id == id))
     {
         return(CustomFunctions.First(b => b.Id == id));
     }
     if (CustomFunctions.Where(b => b.HasChildOptions).SelectMany(b => b.ChildButtons).Any(b => b.Id == id))
     {
         return(CustomFunctions.Where(b => b.HasChildOptions).SelectMany(b => b.ChildButtons).First(b => b.Id == id));
     }
     throw new ArgumentOutOfRangeException("id", "No Button Found With Id Of " + id);
 }
Beispiel #2
0
 public bool Any()
 {
     return(HubVariables.Any() ||
            Datajobs.Any() ||
            Datalinks.Any() ||
            Connections.Any() ||
            Tables.Any() ||
            ColumnValidations.Any() ||
            CustomFunctions.Any() ||
            FileFormats.Any() ||
            RemoteAgentHubs.Any() ||
            DatalinkTests.Any() ||
            Views.Any() ||
            Apis.Any() ||
            Dashboards.Any() ||
            ListOfValues.Any() ||
            Tags.Any() ||
            TagObjects.Any());
 }