/// <summary>
 /// Configures the IPX element with the specifed configuration.
 /// </summary>
 /// <param name="config">The configuration.</param>
 public override void Configure(IPXElementConfiguration config)
 {
     if (config?.Options?.ContainsKey("NC") ?? false)
     {
         this.NormallyClosed = (bool)config.Options["NC"];
     }
     if (config?.Options?.ContainsKey("RefreshOnUpdate") ?? false)
     {
         var args = Enum.GetValues(typeof(GetArgument)).Cast <GetArgument>();
         this.RefreshElementsOnUpdate = ((string)config.Options["RefreshOnUpdate"]).Split(',').Select(type => args.FirstOrDefault(arg => arg.GetEnumMemberValue() == type)).ToList();
     }
 }
Пример #2
0
        /// <summary>
        /// Configures the IPX element with the specifed configuration.
        /// </summary>
        /// <param name="config">The configuration.</param>
        public override void Configure(IPXElementConfiguration config)
        {
            var match = this.GetType().GetCustomAttribute <IPXIdentifierAttribute>().Regex.Match(this.Id);

            this.RollerShutterId = "VR" + (((Convert.ToInt32(match.Groups[1].Value) - 1) * 4) + Convert.ToInt32(match.Groups[2].Value)).ToString("00");
        }
 /// <summary>
 /// Configures the IPX element with the specifed configuration.
 /// </summary>
 /// <param name="config">The configuration.</param>
 public virtual void Configure(IPXElementConfiguration config)
 {
 }