2

このクラスをサーチャーとして使用して、ストアド プロシージャを呼び出してユーザー データを読み取るマネージャー メソッドにユーザー値を渡します。

   public class UserSearcher
{


    public UserSearcher()
    {
        this.username = null;
        this.password = null;
        this.email = null;          
        this.SortType = UserGeneric.SortType.ByKey;
        this.SortOrder = UserGeneric.SortOrder.ASC;


    }

    #region Properties
        public string username { get; set; }
        public string password { get; set; }
        public string email { get; set; }
        public UserGeneric.SortType SortType { get; set; }
        public UserGeneric.SortOrder SortOrder { get; set; }

    #endregion

  }

}

orderType と SortType をストアに渡すために使用する別のクラスがあります。

public class UserGeneric
{

    // Fields
    private SortOrder _order;
    private SortType _type;

    // Methods
    public UserGenericComparer()
    {
        this._type = SortType.BySurName;
        this._order = SortOrder.ASC;
    }

    public UserGenericComparer(SortType type, SortOrder order)
    {
        this._type = type;
        this._order = order;
    }



    // Nested Types
    public enum SortOrder
    {
        ASC = 1,
        DESC = -1
    }

    public enum SortType
    {
        ByKey,
        ByUserName,
        BySurName,
        ByRegistrationDate
    }


}

}

私の問題は、サーチャーを使用するときです。

UserSearcher mysearcher = new UserSearcher();

「mysearcher.SortOrder = something」または「mysearcher.SortType = something」と入力すると、「=」と入力すると (ysearcher.SortOrder の後)、タイプなしで使用できるプロパティが自動的に表示されます。

 uso.SortType = UserGenericComparer.SortType.(List of my properties)

したがって、「=」と入力すると、インテリセンスがプロパティのリストを自動的に表示するようにしたいと考えています。

どうやってやるの?

ありがとうございました

4

0 に答える 0