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

このメソッドから制御が戻るときに、プロファイルの合計数が格納されます。

返品

ユーザー名が指定された ProfileInfoCollection パラメーターと一致する、非アクティブなプロファイルのユーザー プロファイル情報を含むusernameToMatch

次のコード例は、 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 パラメーターは、匿名プロファイルのみ、認証済みプロファイルのみ、またはすべてのプロファイルを検索するかどうかを指定します。 検索されたプロファイルのうち、指定されたLastActivityDate パラメーター値の前に発生したuserInactiveSinceDateを持つプロファイルが返されます。

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

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

適用対象

こちらもご覧ください