ProfileProvider.FindProfilesByUserName メソッドとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > ProfileProvider.FindProfilesByUserName メソッドの意味・解説 

ProfileProvider.FindProfilesByUserName メソッド

メモ : このメソッドは、.NET Framework version 2.0 で新しく追加されたものです。

派生クラスでオーバーライドされた場合、指定されたユーザー名と一致するユーザー名のプロファイルに関するプロファイル情報を取得します。

名前空間: System.Web.Profile
アセンブリ: System.Web (system.web.dll 内)
構文構文

Public MustOverride Function
 FindProfilesByUserName ( _
    authenticationOption As ProfileAuthenticationOption, _
    usernameToMatch As String, _
    pageIndex As Integer, _
    pageSize As Integer, _
    <OutAttribute> ByRef totalRecords As
 Integer _
) As ProfileInfoCollection
Dim instance As ProfileProvider
Dim authenticationOption As ProfileAuthenticationOption
Dim usernameToMatch As String
Dim pageIndex As Integer
Dim pageSize As Integer
Dim totalRecords As Integer
Dim returnValue As ProfileInfoCollection

returnValue = instance.FindProfilesByUserName(authenticationOption, usernameToMatch,
 pageIndex, pageSize, totalRecords)
public abstract ProfileInfoCollection FindProfilesByUserName (
    ProfileAuthenticationOption authenticationOption,
    string usernameToMatch,
    int pageIndex,
    int pageSize,
    out int totalRecords
)
public:
virtual ProfileInfoCollection^ FindProfilesByUserName (
    ProfileAuthenticationOption authenticationOption, 
    String^ usernameToMatch, 
    int pageIndex, 
    int pageSize, 
    [OutAttribute] int% totalRecords
) abstract
public abstract ProfileInfoCollection FindProfilesByUserName (
    ProfileAuthenticationOption authenticationOption, 
    String usernameToMatch, 
    int pageIndex, 
    int pageSize, 
    /** @attribute OutAttribute() */ /** @ref */ int totalRecords
)
JScript では、値型の引数は参照渡しされません。

パラメータ

authenticationOption

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

usernameToMatch

検索するユーザー名。

pageIndex

取得する結果のページのインデックス。

pageSize

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

totalRecords

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

戻り値
指定された usernameToMatch パラメータに一致するユーザー名のプロファイルに関するユーザー プロファイル情報を格納している ProfileInfoCollection。

解説解説

FindProfilesByUserName メソッドは、指定された usernameToMatch パラメータに一致するユーザー名のプロファイルに関するプロファイル情報リストを返します。構成ファイルで指定された applicationName のデータだけが返されます。authenticationOption パラメータは、検索対象のプロファイル (匿名のプロファイルのみ、認証済みプロファイルのみ、またはすべてのプロファイル) を指定します。

データ ソースがワイルドカード文字などの他の検索機能をサポートしている場合、ユーザー名に対する検索機能を拡張できます。

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

使用例使用例

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

Public Overrides Function
 FindProfilesByUserName( _
ByVal authenticationOption As ProfileAuthenticationOption,
 _
ByVal usernameToMatch As String,
 _
ByVal pageIndex As Integer,
 _
ByVal pageSize As Integer,
 _
 ByRef totalRecords As Integer)
 As ProfileInfoCollection

  totalRecords = 0

  Return New ProfileInfoCollection()
End Function
public override ProfileInfoCollection FindProfilesByUserName(
    ProfileAuthenticationOption authenticationOption,
    string usernameToMatch,
    int pageIndex,
    int pageSize,
    out int totalRecords)
{
    totalRecords = 0;

    return new ProfileInfoCollection();
}
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照


このページでは「.NET Framework クラス ライブラリ リファレンス」からProfileProvider.FindProfilesByUserName メソッドを検索した結果を表示しています。
Weblioに収録されているすべての辞書からProfileProvider.FindProfilesByUserName メソッドを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からProfileProvider.FindProfilesByUserName メソッド を検索

英和和英テキスト翻訳

英語⇒日本語日本語⇒英語

辞書ショートカット

すべての辞書の索引

ProfileProvider.FindProfilesByUserName メソッドのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



ProfileProvider.FindProfilesByUserName メソッドのページの著作権

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2026 Microsoft.All rights reserved.

©2026 GRAS Group, Inc.RSS