Ejemplo n.º 1
0
        private IGetObjectService GetGetObjectService()
        {
            var service = (IGetObjectService)BusinessObjectProvider.GetService(_getObjectServiceType);

            if (service == null)
            {
                throw new InvalidOperationException(
                          string.Format(
                              "The '{0}' required for loading objectes of type '{1}' is not registered with the '{2}' associated with this type.",
                              _getObjectServiceType.FullName,
                              TargetType.FullName,
                              typeof(BusinessObjectProvider).FullName));
            }
            return(service);
        }
Ejemplo n.º 2
0
        private IBusinessObjectClassService GetBusinessObjectClassService()
        {
            IBusinessObjectClassService service = BusinessObjectProvider.GetService <IBusinessObjectClassService>();

            if (service == null)
            {
                throw new InvalidOperationException(
                          string.Format(
                              "The '{0}' type does not use the '{1}' implementation of '{2}' and there is no '{3}' registered with the '{4}' associated with this type.",
                              UnderlyingType.FullName,
                              typeof(BindableObjectMixin).Namespace,
                              typeof(IBusinessObject).FullName,
                              typeof(IBusinessObjectClassService).FullName,
                              typeof(BusinessObjectProvider).FullName));
            }
            return(service);
        }