SharedPropertyGroupManagerとは? わかりやすく解説

SharedPropertyGroupManager クラス

共有プロパティ グループへのアクセス制御します。このクラス継承できません。

名前空間: System.EnterpriseServices
アセンブリ: System.EnterpriseServices (system.enterpriseservices.dll 内)
構文構文

<ComVisibleAttribute(False)> _
Public NotInheritable Class
 SharedPropertyGroupManager
    Implements IEnumerable
Dim instance As SharedPropertyGroupManager
[ComVisibleAttribute(false)] 
public sealed class SharedPropertyGroupManager
 : IEnumerable
[ComVisibleAttribute(false)] 
public ref class SharedPropertyGroupManager
 sealed : IEnumerable
/** @attribute ComVisibleAttribute(false) */ 
public final class SharedPropertyGroupManager
 implements IEnumerable
ComVisibleAttribute(false) 
public final class SharedPropertyGroupManager
 implements IEnumerable
使用例使用例

SharedPropertyGroupManager 使用して共有プロパティ作成管理を行う方法次の例に示します

Imports System
Imports System.EnterpriseServices
Imports System.Reflection

<Assembly: ApplicationName("ReceiptNumberGenerator")>
 
<Assembly: ApplicationActivation(ActivationOption.Library)> 
 

Public Class ReceiptNumberGeneratorClass
    
    ' Generates a new receipt number based on the receipt number
    ' stored by the Shared Property Manager (SPM)
    Public Function GetNextReceiptNumber()
 As Integer 
        Dim groupExists, propertyExists As
 Boolean
        Dim nextReceiptNumber As Integer
 = 0
        Dim lockMode As PropertyLockMode =
 PropertyLockMode.SetGet
        Dim releaseMode As PropertyReleaseMode
 = PropertyReleaseMode.Standard
        
        ' Create a shared property group manager.
        Dim groupManager As New
 SharedPropertyGroupManager()

        ' Create a shared property group.
        Dim group As SharedPropertyGroup =
 groupManager.CreatePropertyGroup("Receipts", lockMode,
 releaseMode, groupExists)
        ' Create a shared property.
        Dim ReceiptNumber As SharedProperty
        ReceiptNumber = group.CreateProperty("ReceiptNumber",
 propertyExists)

        ' Retrieve the value from shared property, and increment the
 shared 
        ' property value.
        nextReceiptNumber = Fix(ReceiptNumber.Value)
        ReceiptNumber.Value = nextReceiptNumber + 1

        ' Return nextReceiptNumber
        Return nextReceiptNumber
    
    End Function 'GetNextReceiptNumber

End Class 'ReceiptNumberGeneratorClass
using System;
using System.EnterpriseServices;
using System.Reflection;


[assembly: ApplicationName("ReceiptNumberGenerator")] 
[assembly: ApplicationActivation(ActivationOption.Library)] 

public class ReceiptNumberGeneratorClass
{
    // Generates a new receipt number based on the receipt number
    // stored by the Shared Property Manager (SPM)
    public int GetNextReceiptNumber() 
    {
        bool groupExists,propertyExists;
        int nextReceiptNumber = 0;
        PropertyLockMode lockMode = PropertyLockMode.SetGet;
        PropertyReleaseMode releaseMode = PropertyReleaseMode.Standard;

        // Create a shared property group manager.
        SharedPropertyGroupManager groupManager = new SharedPropertyGroupManager();
        // Create a shared property group.
        SharedPropertyGroup group = groupManager.CreatePropertyGroup("Receipts"
,
                                   ref lockMode, ref releaseMode, out groupExists);
        // Create a shared property.
        SharedProperty ReceiptNumber;
        ReceiptNumber = group.CreateProperty("ReceiptNumber",out propertyExists);
        // Retrieve the value from shared property, and increment the
 shared 
        // property value.
        nextReceiptNumber = (int) ReceiptNumber.Value;
        ReceiptNumber.Value = nextReceiptNumber + 1;
        // Return nextReceiptNumber
        return nextReceiptNumber;
            
    }
}
#using <System.EnterpriseServices.dll>

using namespace System;
using namespace System::EnterpriseServices;
using namespace System::Reflection;

[assembly:AssemblyKeyFile("..\\common\\key.snk")];
[assembly:ApplicationName("ReceiptNumberGenerator")];
[assembly:ApplicationActivation(ActivationOption::Library)];

public ref class ReceiptNumberGeneratorClass
{
public:

   // Generates a new receipt number based on the receipt number
   // stored by the Shared Property Manager (SPM)
   int GetNextReceiptNumber()
   {
      bool groupExists;
      bool propertyExists;
      int nextReceiptNumber = 0;
      PropertyLockMode lockMode = PropertyLockMode::SetGet;
      PropertyReleaseMode releaseMode = PropertyReleaseMode::Standard;
      
      // Create a shared property group manager.
      SharedPropertyGroupManager^ groupManager = gcnew SharedPropertyGroupManager;

      // Create a shared property group.
      SharedPropertyGroup^ group =
         groupManager->CreatePropertyGroup( "Receipts",  lockMode, 
 releaseMode,  groupExists );

      // Create a shared property.
      SharedProperty^ ReceiptNumber;
      ReceiptNumber = group->CreateProperty( "ReceiptNumber",  propertyExists
 );

      // Retrieve the value from shared property, and increment the
 shared 
      // property value.
      nextReceiptNumber =  safe_cast<int>(ReceiptNumber->Value);
      ReceiptNumber->Value = nextReceiptNumber + 1;

      // Return nextReceiptNumber
      return nextReceiptNumber;
   }
};
import System.*;
import System.EnterpriseServices.*;
import System.Reflection.*;

/** @assembly AssemblyKeyFile("key.snk")
 */
/** @assembly ApplicationName("ReceiptNumberGenerator")
 */
/** @assembly ApplicationActivation(ActivationOption.Library)
 */

public class ReceiptNumberGeneratorClass
{
    // Generates a new receipt number based on the receipt number
    // stored by the Shared Property Manager (SPM)
    public int GetNextReceiptNumber()
    {
        boolean groupExists = false;
        boolean propertyExists = false;
        int nextReceiptNumber = 0;
        PropertyLockMode lockMode = PropertyLockMode.SetGet;
        PropertyReleaseMode releaseMode = PropertyReleaseMode.Standard;

        // Create a shared property group manager.
        SharedPropertyGroupManager groupManager =
            new SharedPropertyGroupManager();

        // Create a shared property group.
        SharedPropertyGroup group = groupManager.CreatePropertyGroup("Receipts"
,
            lockMode, releaseMode, groupExists);

        // Create a shared property.
        SharedProperty receiptNumber;
        receiptNumber = group.CreateProperty("receiptNumber", propertyExists);

        // Retrieve the value from shared property, and increment the
 shared 
        // property value.
        nextReceiptNumber = System.Convert.ToInt32(receiptNumber.get_Value());
        receiptNumber.set_Value((Int32)(nextReceiptNumber + 1));

        // Return nextReceiptNumber
        return nextReceiptNumber;
    } //GetNextReceiptNumber 
} //ReceiptNumberGeneratorClass
継承階層継承階層
System.Object
  System.EnterpriseServices.SharedPropertyGroupManager
スレッド セーフスレッド セーフ
この型の public static (Visual Basic では Shared) メンバはすべて、スレッド セーフです。インスタンス メンバ場合は、スレッド セーフであるとは限りません。
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照

SharedPropertyGroupManager コンストラクタ

SharedPropertyGroupManager クラス新しインスタンス初期化します。

名前空間: System.EnterpriseServices
アセンブリ: System.EnterpriseServices (system.enterpriseservices.dll 内)
構文構文

Dim instance As New SharedPropertyGroupManager
public SharedPropertyGroupManager ()
public:
SharedPropertyGroupManager ()
public SharedPropertyGroupManager ()
public function SharedPropertyGroupManager
 ()
使用例使用例

SharedPropertyGroupManager コンストラクタ使用してSharedPropertyGroupManager クラスインスタンス作成する方法次のコード例示します

' Create a shared property group manager.
Dim groupManager As New
 SharedPropertyGroupManager()
// Create a shared property group manager.
SharedPropertyGroupManager groupManager = new SharedPropertyGroupManager();
// Create a shared property group manager.
SharedPropertyGroupManager^ groupManager = gcnew SharedPropertyGroupManager;
// Create a shared property group manager.
SharedPropertyGroupManager groupManager =
    new SharedPropertyGroupManager();
.NET Framework のセキュリティ.NET Frameworkセキュリティ
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
SharedPropertyGroupManager クラス
SharedPropertyGroupManager メンバ
System.EnterpriseServices 名前空間

SharedPropertyGroupManager メソッド


パブリック メソッドパブリック メソッド

プロテクト メソッドプロテクト メソッド
参照参照

関連項目

SharedPropertyGroupManager クラス
System.EnterpriseServices 名前空間

SharedPropertyGroupManager メンバ

共有プロパティ グループへのアクセス制御します。このクラス継承できません。

SharedPropertyGroupManager データ型公開されるメンバを以下の表に示します


パブリック コンストラクタパブリック コンストラクタ
  名前 説明
パブリック メソッド SharedPropertyGroupManager SharedPropertyGroupManager クラス新しインスタンス初期化します。
パブリック メソッドパブリック メソッド
プロテクト メソッドプロテクト メソッド
参照参照

関連項目

SharedPropertyGroupManager クラス
System.EnterpriseServices 名前空間


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

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

辞書ショートカット

すべての辞書の索引

「SharedPropertyGroupManager」の関連用語

SharedPropertyGroupManagerのお隣キーワード
検索ランキング

   

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



SharedPropertyGroupManagerのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

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

©2025 GRAS Group, Inc.RSS