Ejemplo n.º 1
0
        private IBusinessObjectClass GetReferenceClassFromService()
        {
            IBusinessObjectClassService service             = GetBusinessObjectClassService();
            IBusinessObjectClass        businessObjectClass = service.GetBusinessObjectClass(UnderlyingType);

            if (businessObjectClass == null)
            {
                throw new InvalidOperationException(
                          string.Format(
                              "The GetBusinessObjectClass method of '{0}', registered with the '{1}', failed to return an '{2}' for type '{3}'.",
                              service.GetType().FullName,
                              BusinessObjectProvider.GetType().FullName,
                              typeof(IBusinessObjectClass).FullName,
                              UnderlyingType.FullName));
            }

            return(businessObjectClass);
        }