PolicyLevel.Label プロパティとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > PolicyLevel.Label プロパティの意味・解説 

PolicyLevel.Label プロパティ

ポリシー レベル説明するラベル取得します

名前空間: System.Security.Policy
アセンブリ: mscorlib (mscorlib.dll 内)
構文構文

解説解説
使用例使用例

ポリシー レベル ラベル使用してリスト書き込む例を次に示します。このコード例は、PolicyLevel クラストピック取り上げているコード例一部分です。

' Demonstrate the use of ResolvePolicy for passed in evidence.
Private Overloads Shared
 Sub CheckEvidence(ByVal evidence As
 Evidence)
    ' Display the code groups to which the evidence belongs.
    Console.WriteLine("ResolvePolicy for the given evidence.")
    Console.WriteLine(ControlChars.Tab + "Current evidence belongs
 to the following code groups:")
    Dim policyEnumerator As IEnumerator = SecurityManager.PolicyHierarchy()
    ' Resolve the evidence at all the policy levels.
    While policyEnumerator.MoveNext()
        Dim currentLevel As PolicyLevel = CType(policyEnumerator.Current,
 PolicyLevel)
        Dim cg1 As CodeGroup = currentLevel.ResolveMatchingCodeGroups(evidence)
        Console.WriteLine((ControlChars.Lf + ControlChars.Tab + currentLevel.Label
 + " Level"))
        Console.WriteLine((ControlChars.Tab + ControlChars.Tab + "CodeGroup
 = " + cg1.Name))
        Dim cgE1 As IEnumerator = cg1.Children.GetEnumerator()
        While cgE1.MoveNext()
            Console.WriteLine((ControlChars.Tab + ControlChars.Tab + ControlChars.Tab
 + "Group = " + CType(cgE1.Current, CodeGroup).Name))
        End While
        Console.WriteLine((ControlChars.Tab + "StoreLocation =
 " + currentLevel.StoreLocation))
    End While

    Return
End Sub 'CheckEvidence

// Demonstrate the use of ResolvePolicy for passed in evidence.
private static void CheckEvidence(Evidence
 evidence)
{
    // Display the code groups to which the evidence belongs.
    Console.WriteLine("ResolvePolicy for the given evidence.");
    Console.WriteLine("\tCurrent evidence belongs to the following code groups:");
    IEnumerator policyEnumerator = SecurityManager.PolicyHierarchy();
    // Resolve the evidence at all the policy levels.
    while (policyEnumerator.MoveNext())
    {

        PolicyLevel currentLevel = (PolicyLevel)policyEnumerator.Current;    
        CodeGroup cg1 = currentLevel.ResolveMatchingCodeGroups(evidence);
        Console.WriteLine("\n\t" + currentLevel.Label + " Level");
        Console.WriteLine("\t\tCodeGroup = " + cg1.Name);
        IEnumerator cgE1 = cg1.Children.GetEnumerator();
        while (cgE1.MoveNext())
        {
            Console.WriteLine("\t\t\tGroup = " + ((CodeGroup)cgE1.Current).Name);
        }
        Console.WriteLine("\tStoreLocation = " + currentLevel.StoreLocation);

    }

    return;
}
// Demonstrate the use of ResolvePolicy for passed in evidence.
void CheckEvidence( Evidence^ evidence )
{
   // Display the code groups to which the evidence belongs.
   Console::WriteLine( "ResolvePolicy for the given evidence."
 );
   Console::WriteLine( "\tCurrent evidence belongs to the following code groups:"
 );
   IEnumerator^ policyEnumerator = SecurityManager::PolicyHierarchy();

   // Resolve the evidence at all the policy levels.
   while ( policyEnumerator->MoveNext() )
   {
      PolicyLevel^ currentLevel = dynamic_cast<PolicyLevel^>(policyEnumerator->Current);
      CodeGroup^ cg1 = currentLevel->ResolveMatchingCodeGroups( evidence );
      Console::WriteLine( "\n\t{0} Level", currentLevel->Label );
      Console::WriteLine( "\t\tCodeGroup = {0}", cg1->Name );
      IEnumerator^ cgE1 = cg1->Children->GetEnumerator();
      while ( cgE1->MoveNext() )
      {
         Console::WriteLine( "\t\t\tGroup = {0}", (dynamic_cast<CodeGroup^>(cgE1->Current))->Name
 );
      }

      Console::WriteLine( "\tStoreLocation = {0}", currentLevel->StoreLocation
 );
   }

   return;
}
// StoreLocation PolicyLevel.Label
// Demonstrate the use of ResolvePolicy for passed in evidence.
private static void CheckEvidence(Evidence
 evidence)
{
    // Display the code groups to which the evidence belongs.
    Console.WriteLine("ResolvePolicy for the given evidence.");
    Console.WriteLine("\tCurrent evidence belongs to the "
        + "following code groups:");

    IEnumerator policyEnumerator = SecurityManager.PolicyHierarchy();
    // Resolve the evidence at all the policy levels.
    while (policyEnumerator.MoveNext()) {
        PolicyLevel currentLevel = ((PolicyLevel)
            (policyEnumerator.get_Current()));
        CodeGroup cg1 = currentLevel.ResolveMatchingCodeGroups(evidence);

        Console.WriteLine(("\n\t" + currentLevel.get_Label() + " Level"));
        Console.WriteLine(("\t\tCodeGroup = " + cg1.get_Name()));
        IEnumerator cgE1 = cg1.get_Children().GetEnumerator();
        while (cgE1.MoveNext()) {
            Console.WriteLine(("\t\t\tGroup = " + ((CodeGroup)
                (cgE1.get_Current())).get_Name()));
        }
        Console.WriteLine(("\tStoreLocation = " 
            + currentLevel.get_StoreLocation()));
    }
    return;
} //CheckEvidence
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
PolicyLevel クラス
PolicyLevel メンバ
System.Security.Policy 名前空間


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

英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「PolicyLevel.Label プロパティ」の関連用語

PolicyLevel.Label プロパティのお隣キーワード
検索ランキング

   

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



PolicyLevel.Label プロパティのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

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

©2025 GRAS Group, Inc.RSS