ProfileProvider.FindInactiveProfilesByUserName メソッド

定義

派生クラスでオーバーライドされた場合、最後のアクティビティの日付が指定した日付またはそれ以前であり、指定されたユーザー名と一致するユーザー名のプロファイルに関する、プロファイル情報を取得します。

public:
 abstract System::Web::Profile::ProfileInfoCollection ^ FindInactiveProfilesByUserName(System::Web::Profile::ProfileAuthenticationOption authenticationOption, System::String ^ usernameToMatch, DateTime userInactiveSinceDate, int pageIndex, int pageSize, [Runtime::InteropServices::Out] int % totalRecords);
public abstract System.Web.Profile.ProfileInfoCollection FindInactiveProfilesByUserName (System.Web.Profile.ProfileAuthenticationOption authenticationOption, string usernameToMatch, DateTime userInactiveSinceDate, int pageIndex, int pageSize, out int totalRecords);
abstract member FindInactiveProfilesByUserName : System.Web.Profile.ProfileAuthenticationOption * string * DateTime * int * int * int -> System.Web.Profile.ProfileInfoCollection
Public MustOverride Function FindInactiveProfilesByUserName (authenticationOption As ProfileAuthenticationOption, usernameToMatch As String, userInactiveSinceDate As DateTime, pageIndex As Integer, pageSize As Integer, ByRef totalRecords As Integer) As ProfileInfoCollection

パラメーター

authenticationOption
ProfileAuthenticationOption

プロファイルの種類 (匿名、認証、またはその両方) を指定する ProfileAuthenticationOption 値の 1 つが返されます。

usernameToMatch
String

検索するユーザー名。

userInactiveSinceDate
DateTime

アクティブでないと見なすユーザー プロファイルを識別する DateTime。 ユーザー プロファイルの LastActivityDate 値が、この日時またはそれ以前に発生している場合、このプロファイルは無効と見なされます。

pageIndex
Int32

返される結果ページのインデックス。

pageSize
Int32

取得する結果のページのサイズ。

totalRecords
Int32

このメソッドが返されるときに、プロファイルの総数を格納します。

戻り値

指定された usernameToMatch パラメーターとユーザー名が一致していて、無効なプロファイルに関するユーザー プロファイル情報を格納している ProfileInfoCollection

次のコード例は、 メソッドの実装のメソッド シグネチャを FindInactiveProfilesByUserName 示しています。 完全 ProfileProvider な実装の例については、「 方法: プロファイル プロバイダーの例をビルドして実行する」を参照してください。

public override ProfileInfoCollection FindInactiveProfilesByUserName(
    ProfileAuthenticationOption authenticationOption,
    string usernameToMatch,
    DateTime userInactiveSinceDate,
    int pageIndex,
    int pageSize,
    out int totalRecords)
{
    totalRecords = 0;

    return new ProfileInfoCollection();
}
Public Overrides Function FindInactiveProfilesByUserName( _
ByVal authenticationOption As ProfileAuthenticationOption, _
ByVal usernameToMatch As String, _
ByVal userInactiveSinceDate As DateTime, _
ByVal pageIndex As Integer, _
ByVal pageSize As Integer, _
 ByRef totalRecords As Integer) As ProfileInfoCollection

  totalRecords = 0

  Return New ProfileInfoCollection()
End Function

注釈

メソッドは FindInactiveProfilesByUserName 、ユーザー名が指定 usernameToMatch されたパラメーターと一致するプロファイルの未使用のユーザー プロファイルのプロファイル情報を取得するために使用されます。 構成ファイルで指定された のデータ applicationName のみが返されます。 パラメーターは authenticationOption 、匿名プロファイル、認証済みプロファイルのみ、またはすべてのプロファイルのみを検索するかどうかを指定します。 検索されたプロファイルのうち、 が指定されたuserInactiveSinceDateパラメーター値の上または前に出現するプロファイルLastActivityDateが返されます。

データ ソースでワイルドカード文字などの追加の検索機能がサポートされている場合は、ユーザー名に対してより広範な検索機能を提供できます。

によってFindInactiveProfilesByUserName返される結果は、 パラメーターと pageSize パラメーターによってpageIndex制限されます。 パラメーターは pageSize 、 で返されるオブジェクトの ProfileInfo 最大数を ProfileInfoCollection識別します。 パラメーターは pageIndex 、返す結果のページを識別します。0 は最初のページを識別します。 パラメーターはtotalRecords、 パラメーターと userInactiveSinceDate パラメーターに基づいて、構成された applicationNameの非アクティブなユーザー プロファイルの合計数に設定されるauthenticationOptionパラメーターoutです。 たとえば、構成された applicationNamepageIndex のユーザーが 13 人で、値が 1 で、 pageSize が 5 の場合、ProfileInfoCollection返される 6 番目から 10 番目の非アクティブなプロファイルが返されます。 パラメーターは totalRecords 13 に設定されます。

適用対象

こちらもご覧ください