示例#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());
 }
示例#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);
            }
        }
示例#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));
 }