コード例 #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)));
 }
コード例 #4
0
 public Type TypeFromCode(string code)
 {
     return(Type.GetType(code) ?? FacadeUtils.GetTypeFromLoadedAssemblies(code));
 }