Ejemplo n.º 1
0
        public IntlNotamDetailViewModel(NotamDetail notam, NotamDetailService notamDetailService, IntlNotamService notamService, ObservableCollection<WorkspaceViewModel> parent, WorkspaceViewModel ntmWorkspace)
        {
            parentWorkSpaces = parent;
            NotamWorkspace = ntmWorkspace;
            if (notam == null)
                throw new ArgumentNullException("notam");

            if (notamService == null)
                throw new ArgumentNullException("notamService");
            if (notamDetailService == null)
                throw new ArgumentNullException("notamDetailService");

            _notam = notam;
            _notamDetailService = notamDetailService;
            _notamService = notamService;


            this.validators = this.GetType()
               .GetProperties()
               .Where(p => this.GetValidations(p).Length != 0)
               .ToDictionary(p => p.Name, p => this.GetValidations(p));

            this.propertyGetters = this.GetType()
                .GetProperties()
                .Where(p => this.GetValidations(p).Length != 0)
                .ToDictionary(p => p.Name, p => this.GetValueGetter(p));
        }
Ejemplo n.º 2
0
using System;