Exemplo n.º 1
0
        public string GetProperty( string device, params string[] propertyNames )
        {
            foreach ( var item in propertyNames ) {
                PropertyCommandResult pcr = new PropertyCommandResult ( ShellRun ( device, string.Format ( CultureInfo.InvariantCulture, "getprop {0}", item ) ).Output.ToString ( ) );
                if ( !String.IsNullOrEmpty ( pcr.Value ) ) {
                    return pcr.Value;
                }
            }

            return null;
        }
Exemplo n.º 2
0
 /// <summary>
 /// Gets the property.
 /// </summary>
 /// <param name="device">The device.</param>
 /// <param name="propertyName">Name of the property.</param>
 /// <returns></returns>
 public string GetProperty( string device, string propertyName )
 {
     PropertyCommandResult pcr = new PropertyCommandResult ( ShellRun ( device, string.Format ( CultureInfo.InvariantCulture, "getprop {0}", propertyName ) ).Output.ToString ( ) );
     return pcr.Value;
 }