コード例 #1
0
 /// <summary>
 /// Initializes a new instance of the MigrateMySqlRequestInner class.
 /// </summary>
 /// <param name="connectionString">Connection string to the remote
 /// MySQL database.</param>
 /// <param name="migrationType">The type of migration operation to be
 /// done. Possible values include: 'LocalToRemote',
 /// 'RemoteToLocal'</param>
 /// <param name="id">Resource Id.</param>
 /// <param name="name">Resource Name.</param>
 /// <param name="kind">Kind of resource.</param>
 /// <param name="type">Resource type.</param>
 public MigrateMySqlRequestInner(string connectionString, MySqlMigrationType migrationType, string id = default(string), string name = default(string), string kind = default(string), string type = default(string))
     : base(id, name, kind, type)
 {
     ConnectionString = connectionString;
     MigrationType    = migrationType;
     CustomInit();
 }
コード例 #2
0
        internal static string ToSerializedValue(this MySqlMigrationType value)
        {
            switch (value)
            {
            case MySqlMigrationType.LocalToRemote:
                return("LocalToRemote");

            case MySqlMigrationType.RemoteToLocal:
                return("RemoteToLocal");
            }
            return(null);
        }
コード例 #3
0
 /// <summary>
 /// Converts the <see cref="sourceValue" /> parameter to the <see cref="destinationType" /> parameter using <see cref="formatProvider"
 /// /> and <see cref="ignoreCase" />
 /// </summary>
 /// <param name="sourceValue">the <see cref="System.Object"/> to convert from</param>
 /// <param name="destinationType">the <see cref="System.Type" /> to convert to</param>
 /// <param name="formatProvider">not used by this TypeConverter.</param>
 /// <param name="ignoreCase">when set to <c>true</c>, will ignore the case when converting.</param>
 /// <returns>
 /// an instance of <see cref="MySqlMigrationType" />, or <c>null</c> if there is no suitable conversion.
 /// </returns>
 public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => MySqlMigrationType.CreateFrom(sourceValue);
 public static string ToSerialString(this MySqlMigrationType value) => value switch
 {