Ejemplo n.º 1
0
        public void StartNofity(List <NotifyConfig> notifyWcf, String urlWcf, String conectionString)
        {
            List <ChangeType> changesTyps = null;
            Type tableNotifycation        = null;

            foreach (NotifyConfig item in notifyWcf)
            {
                changesTyps       = new  List <ChangeType>();
                tableNotifycation = Dictionary.Where(t => t.Key.ToUpper() == item.TableName.ToUpper() && !TablesInNotify.ContainsKey(t.Key.ToUpper()))?.FirstOrDefault().Value;
                if (tableNotifycation != null)
                {
                    INotifyTable notifyTable = (INotifyTable)Activator.CreateInstance(tableNotifycation);
                    item.EnventArray.ToList().ForEach(e => { changesTyps.Add(CastChange(e)); });
                    notifyTable.NotifyWcfStart(conectionString, urlWcf, item.PropiertyChange, changesTyps.ToArray(), item.NameNotification);
                    TablesInNotify.Add(item.TableName.ToUpper(), notifyTable);
                }
            }
        }
Ejemplo n.º 2
0
 public static void SetContextByINotifyTable(BindableObject bindable, INotifyTable notify)
 {
     bindable.context = notify;
 }