Ejemplo n.º 1
0
        public void Init()
        {
            PIWebApiClient client = PIWebApiClientGenerator.GenerateInstance();

            instance             = client.Configuration;
            configElement        = AFObject.FindObject(Constants.PIWEBAPI_CONFIGURATION_ELEMENT_PATH) as AFElement;
            corsExpHeaders       = configElement.Attributes[Constants.PIWEBAPI_CONFIGURATION_CORSEXPHEADERS].GetValue().Value.ToString();
            corsMethods          = configElement.Attributes[Constants.PIWEBAPI_CONFIGURATION_CORSMETHODS].GetValue().Value.ToString();
            scanSearchInterval   = configElement.Attributes[Constants.PIWEBAPI_CONFIGURATION_CORSEACHSCANINTERVALS].GetValue().ValueAsInt32();
            corsMethodsAttribute = configElement.Attributes[Constants.PIWEBAPI_CONFIGURATION_CORSMETHODS];
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Initialises a new instance of the <see cref="GenreApi"/> class.
 /// </summary>
 /// <param name="configurationApi">The configuration API.</param>
 public GenreApi(IConfigurationApi configurationApi)
 {
     _configurationApi = configurationApi;
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Initialises a new instance of the <see cref="MovieApi"/> class.
 /// </summary>
 /// <param name="configurationApi">The configuration API.</param>
 /// <param name="imageHelper">The image helper.</param>
 public MovieApi(IConfigurationApi configurationApi, ImageUrlHelper imageHelper)
 {
     _configurationApi = configurationApi;
     _imageHelper      = imageHelper;
 }