Esempio n. 1
0
 private NakedObject GetServiceByServiceNameInternal(string serviceName)
 {
     if (string.IsNullOrEmpty(serviceName.Trim()))
     {
         throw new BadRequestNOSException();
     }
     return(FacadeUtils.GetServicesInternal().Where(s => s.getSpecification().getFullName() == serviceName).SingleOrDefault());
 }
Esempio n. 2
0
        public object GetServiceByServiceName(IOidTranslation serviceName)
        {
            Type type = ValidateServiceId(serviceName);

            try {
                return(FacadeUtils.GetServicesInternal().Single(s => s.getSpecification().getFullName() == type.FullName).getObject());
            }
            catch (Exception e) {
                throw new ServiceResourceNotFoundNOSException(serviceName.DomainType, e);
            }
        }
Esempio n. 3
0
 private static string GetCode(ITypeFacade spec)
 {
     return(GetCode(FacadeUtils.GetType(spec.FullName)));
 }
 public Type TypeFromCode(string code)
 {
     return(Type.GetType(code) ?? FacadeUtils.GetTypeFromLoadedAssemblies(code));
 }