Ejemplo n.º 1
0
        public AzuraOwn(FaceServices services)
        {
            subscriptionKey = "e721666785724a9a947d5d05772fd6ea";
            faceEndpoint    = "https://frservice1.cognitiveservices.azure.com";//Environment.GetEnvironmentVariable("FACE_ENDPOINT");
            faceClient      = new FaceClient(
                new ApiKeyServiceClientCredentials(subscriptionKey),
                new System.Net.Http.DelegatingHandler[] { });

            if (Environment.GetEnvironmentVariable("FACE_IMAGEFOLDER") != null)
            {
                imageFolder = @Environment.GetEnvironmentVariable("FACE_IMAGEFOLDER");
            }

            if (Uri.IsWellFormedUriString(faceEndpoint, UriKind.Absolute))
            {
                faceClient.Endpoint = faceEndpoint;
            }
            else
            {
                //     MessageBox.Show(faceEndpoint,
                //    "Invalid URI", MessageBoxButton.OK, MessageBoxImage.Error);
                Environment.Exit(0);
            }
            _services = services;
        }
Ejemplo n.º 2
0
        public MyFace(PersonMySql db)
        {
            var faceServer = ConfigurationManager.AppSettings["faceserver"];

            Constrants.Init(faceServer);
            fs = new FaceServices();
            fs.GetVersion();
            this.db = db;
            print("create a server object");
        }
Ejemplo n.º 3
0
        public FaceController(FaceServices services)
        {
            _services = services;
            FaceModel fm = new FaceModel();

            fm.Id   = 1;
            fm.name = "Robinhood";
            _services.AddFaceItems(fm);
            //azura = new AzuraOwn();
        }
 public UsersController(UserServices userServ, FaceServices faceService)
 {
     _userServ    = userServ;
     _faceService = faceService;
 }
Ejemplo n.º 5
0
 public ValuesController(FaceServices services)
 {
     //_services = services;
     azura = new AzuraOwn(services);
     //Redirect()
 }