Ejemplo n.º 1
0
        public static string Get_DefaultCalendarName(this IModelCalendar modelCalendar)
        {
            var interfaces = modelCalendar.Parent.GetType().GetInterfaces();

            if (interfaces.Any(type => type.Name.Contains("Microsoft")))
            {
                return("Calendar");
            }
            if (interfaces.Any(type => type.Name.Contains("Google")))
            {
                return("primary");
            }
            throw new NotImplementedException();
        }
Ejemplo n.º 2
0
 public static CalculatedModelNodeList <IModelClass> Get_NewCloudEvents(this IModelCalendar modelCalendar)
 => modelCalendar.Application.BOModel.Where(c => c.TypeInfo.IsPersistent && !c.TypeInfo.IsAbstract && typeof(IEvent).IsAssignableFrom(c.TypeInfo.Type)).ToCalculatedModelNodeList();
Ejemplo n.º 3
0
 public static IModelClass Get_NewCloudEvent(this IModelCalendar modelCalendar)
 => modelCalendar.NewCloudEvents.FirstOrDefault();