MimeTextMatch.Group プロパティ

テキスト検索の結果を配置するグループの数を示す値を取得または設定します。

Public Property Group As Integer
[C#]
public int Group {get; set;}
[C++]
public: __property int get_Group();public: __property void set_Group(int);
[JScript]
public function get Group() : int;public function set Group(int);

プロパティ値

32 ビット符号付き整数。既定値は 1 です。

例外

例外の種類 条件
ArgumentException プロパティ値が負の値です。

解説

このプロパティの値は Repeats プロパティの値以下にする必要があります。それより大きい値にすると XML Web サービスは正しくコンパイルしません。

使用例

 
' Create an InputBinding.
Dim myInputBinding As New InputBinding()
Dim myMimeTextBinding As New MimeTextBinding()
Dim myMimeTextMatchCollection1 As New MimeTextMatchCollection()
Dim myMimeTextMatch(2) As MimeTextMatch
myMimeTextMatchCollection1 = myMimeTextBinding.Matches

' Intialize the MimeTextMatch. 
For myInt = 0 To 2

   ' Get a new MimeTextMatch.
   myMimeTextMatch(myInt) = New MimeTextMatch()

   ' Assign values to properties of the MimeTextMatch.
   myMimeTextMatch(myInt).Name = "Title" + Convert.ToString(myInt)
   myMimeTextMatch(myInt).Type = "*/*"
   myMimeTextMatch(myInt).Pattern = "TITLE>(.*?)<"
   myMimeTextMatch(myInt).IgnoreCase = True
   myMimeTextMatch(myInt).Capture = 2
   myMimeTextMatch(myInt).Group = 2
   If myInt <> 0 Then

      ' Assign the Repeats property if the index is not 0.
      myMimeTextMatch(myInt).Repeats = 2
   Else

      ' Assign the RepeatsString property if the index is 0.
      myMimeTextMatch(myInt).RepeatsString = "4"
   End If

   ' Add 'MimeTextMatch' instance to collection.
   myMimeTextMatchCollection1.Add(myMimeTextMatch(myInt))
Next myInt

[C#] 
// Create an InputBinding.
InputBinding myInputBinding = new InputBinding();
MimeTextBinding myMimeTextBinding = new MimeTextBinding();
MimeTextMatchCollection myMimeTextMatchCollection1 = 
   new MimeTextMatchCollection();
MimeTextMatch[] myMimeTextMatch = new MimeTextMatch[3];        
myMimeTextMatchCollection1 = myMimeTextBinding.Matches;

// Intialize the MimeTextMatch. 
for( myInt = 0 ; myInt < 3 ; myInt++ )
{
   // Get a new MimeTextMatch.
   myMimeTextMatch[ myInt ] = new MimeTextMatch();

   // Assign values to properties of the MimeTextMatch.
   myMimeTextMatch[ myInt ].Name = "Title" + Convert.ToString( myInt );
   myMimeTextMatch[ myInt ].Type = "*/*";
   myMimeTextMatch[ myInt ].Pattern = "TITLE&gt;(.*?)&lt;";
   myMimeTextMatch[ myInt ].IgnoreCase = true;
   myMimeTextMatch[ myInt ].Capture = 2;
   myMimeTextMatch[ myInt ].Group = 2;     
   if( myInt != 0 )
   {
      // Assign the Repeats property if the index is not 0.
      myMimeTextMatch[ myInt ].Repeats = 2;
   }
   else
   {
      // Assign the RepeatsString property if the index is 0.
      myMimeTextMatch[ myInt ].RepeatsString = "4";
   }
   // Add the MimeTextMatch to the collection.
   myMimeTextMatchCollection1.Add( myMimeTextMatch[ myInt ] );
}

[C++] 
// Create an InputBinding.
InputBinding* myInputBinding = new InputBinding();
MimeTextBinding* myMimeTextBinding = new MimeTextBinding();
MimeTextMatchCollection* myMimeTextMatchCollection1 =
   new MimeTextMatchCollection();
MimeTextMatch* myMimeTextMatch[] = new MimeTextMatch*[3];
myMimeTextMatchCollection1 = myMimeTextBinding->Matches;

// Intialize the MimeTextMatch.
for( myInt = 0 ; myInt < 3 ; myInt++ )
{
   // Get a new MimeTextMatch.
   myMimeTextMatch[ myInt ] = new MimeTextMatch();

   // Assign values to properties of the MimeTextMatch.
   myMimeTextMatch[ myInt ]->Name = String::Format( S"Title{0}", Convert::ToString(myInt) );
   myMimeTextMatch[ myInt ]->Type = S"*/*";
   myMimeTextMatch[ myInt ]->Pattern = S"TITLE&gt;(.*?)&lt;";
   myMimeTextMatch[ myInt ]->IgnoreCase = true;
   myMimeTextMatch[ myInt ]->Capture = 2;
   myMimeTextMatch[ myInt ]->Group = 2;
   if( myInt != 0 )
   {
      // Assign the Repeats property if the index is not 0.
      myMimeTextMatch[ myInt ]->Repeats = 2;
   }
   else
   {
      // Assign the RepeatsString property if the index is 0.
      myMimeTextMatch[ myInt ]->RepeatsString = S"4";
   }
   // Add the MimeTextMatch to the collection.
   myMimeTextMatchCollection1->Add( myMimeTextMatch[ myInt ] );
}

[JScript] JScript のサンプルはありません。Visual Basic、C#、および C++ のサンプルを表示するには、このページの左上隅にある言語のフィルタ ボタン 言語のフィルタ をクリックします。

必要条件

プラットフォーム: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 ファミリ

参照

MimeTextMatch クラス | MimeTextMatch メンバ | System.Web.Services.Description 名前空間