コード例 #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;
        }
コード例 #2
0
ファイル: MyFace.cs プロジェクト: ysjr-2002/ICE-Stduy
        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");
        }
コード例 #3
0
        public FaceController(FaceServices services)
        {
            _services = services;
            FaceModel fm = new FaceModel();

            fm.Id   = 1;
            fm.name = "Robinhood";
            _services.AddFaceItems(fm);
            //azura = new AzuraOwn();
        }
コード例 #4
0
 public UsersController(UserServices userServ, FaceServices faceService)
 {
     _userServ    = userServ;
     _faceService = faceService;
 }
コード例 #5
0
 public ValuesController(FaceServices services)
 {
     //_services = services;
     azura = new AzuraOwn(services);
     //Redirect()
 }