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

CodeDomProvider イベント


パブリック イベントパブリック イベント

参照参照

関連項目

CodeDomProvider クラス
System.CodeDom.Compiler 名前空間
CompilerInfo
CSharpCodeProvider
VBCodeProvider
JScriptCodeProvider

その他の技術情報

コンパイラおよび言語プロバイダ設定スキーマ

CodeDomProvider クラス

CodeDomProvider実装基本クラス提供します。このクラス抽象クラスです。

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

<ComVisibleAttribute(True)> _
Public MustInherit Class
 CodeDomProvider
    Inherits Component
Dim instance As CodeDomProvider
[ComVisibleAttribute(true)] 
public abstract class CodeDomProvider : Component
[ComVisibleAttribute(true)] 
public ref class CodeDomProvider abstract :
 public Component
/** @attribute ComVisibleAttribute(true) */ 
public abstract class CodeDomProvider extends
 Component
ComVisibleAttribute(true) 
public abstract class CodeDomProvider extends
 Component
解説解説

CodeDomProvider使用してコード ジェネレータコード コンパイラインスタンス作成および取得できますコード ジェネレータ使用して特定の言語コード生成でき、コード コンパイラ使用してコードアセンブリコンパイルできます

通常CodeDomProvider実装には、単一プログラム言語対応するコード生成コンパイル管理を行うために、コード生成コード コンパイルインターフェイス用意されています。.NET Framework SDK と共に出荷される CodeDomProvider実装では、複数言語サポートされます。サポートされる言語には、C#Visual BasicC++J#、および JScript含まれます。開発者コンパイラ ベンダは、ICodeGenerator インターフェイスと ICodeCompiler インターフェイス実装して、CodeDom サポートを他のプログラミング言語拡張する CodeDomProvider を提供できます

マシン構成ファイル (Machine.config) の <system.codedom> 要素 には、開発者コンパイラ販売元追加CodeDomProvider 実装構成設定追加するための機構用意されています。

CodeDomProvider クラスには、コンピュータ上の CodeDomProvider 実装検出し列挙する静的メソッド用意されています。GetAllCompilerInfo メソッドは、コンピュータ上のすべての CodeDomProvider 実装設定返します。GetCompilerInfo メソッドは、プログラミング言語名に基づいて特定の CodeDomProvider 実装設定返します。CreateProvider メソッドは、特定の言語CodeDomProvider 実装インスタンス返します

構成ファイル言語プロバイダ設定詳細については、「コンパイラおよび言語プロバイダ設定スキーマ」を参照してください

メモメモ

このクラスは、リンク確認要求継承確認要求クラス レベル行います直前呼び出し元または派生クラスに完全信頼アクセス許可ない場合、SecurityException がスローさます。セキュリティ要求詳細については、「リンク確認要求」および「継承確認要求」を参照してください

継承時の注意 .NET Framework Version 1.0 および 1.1 では、コード プロバイダCodeDomProviderICodeGenerator、ICodeParser、および ICodeCompiler の各実装構成されます。.NET Framework 2.0 では、CreateGenerator、CreateParser、および CreateCompiler の各メソッド使用されなくなりましたICodeGenerator および ICodeCompilerメソッドは、CodeDomProvider クラス直接使用できますコード プロバイダ実装でこれらのメソッドオーバーライドし、基本メソッド呼び出さないようにしてください

使用例使用例

Console クラス使用して "Hello World" と表示するプログラムの CodeDOM モデル基づいてソース コード生成コンパイル実行できるプログラム例次に示しますWindows フォームユーザー インターフェイス用意されています。ユーザーは、C#Visual Basic、および JScript という複数選択肢から、対象プログラミング言語選択できます

Imports System
Imports System.CodeDom
Imports System.CodeDom.Compiler
Imports System.Collections
Imports System.ComponentModel
Imports System.Diagnostics
Imports System.Drawing
Imports System.IO
Imports System.Windows.Forms
Imports Microsoft.CSharp
Imports Microsoft.VisualBasic
Imports Microsoft.JScript

' This example demonstrates building a Hello World program graph 
' using System.CodeDom elements. It calls code generator and
' code compiler methods to build the program using CSharp, VB, or
' JScript.  A Windows Forms interface is included. Note: Code
' must be compiled and linked with the Microsoft.JScript assembly. 
Namespace CodeDOMExample

    Class CodeDomExample
        ' Build a Hello World program graph using 
        ' System.CodeDom types.
        Public Shared Function
 BuildHelloWorldGraph() As CodeCompileUnit

            ' Create a new CodeCompileUnit to contain 
            ' the program graph.
            Dim compileUnit As New
 CodeCompileUnit()

            ' Declare a new namespace called Samples.
            Dim samples As New
 CodeNamespace("Samples")

            ' Add the new namespace to the compile unit.
            compileUnit.Namespaces.Add(samples)

            ' Add the new namespace import for the System namespace.
            samples.Imports.Add(New CodeNamespaceImport("System"))

            ' Declare a new type called Class1.
            Dim class1 As New
 CodeTypeDeclaration("Class1")

            ' Add the new type to the namespace type collection.
            samples.Types.Add(class1)

            ' Declare a new code entry point method.
            Dim start As New
 CodeEntryPointMethod()

            ' Create a type reference for the System.Console class.
            Dim csSystemConsoleType As New
 CodeTypeReferenceExpression( _
                "System.Console")

            ' Build a Console.WriteLine statement.
            Dim cs1 As New
 CodeMethodInvokeExpression( _
                csSystemConsoleType, "WriteLine",
 _
                New CodePrimitiveExpression("Hello
 World!"))

            ' Add the WriteLine call to the statement collection.
            start.Statements.Add(cs1)

            ' Build another Console.WriteLine statement.
            Dim cs2 As New
 CodeMethodInvokeExpression( _
                csSystemConsoleType, "WriteLine",
 _
                New CodePrimitiveExpression("Press
 the Enter key to continue."))

            ' Add the WriteLine call to the statement collection.
            start.Statements.Add(cs2)

            ' Build a call to System.Console.ReadLine.
            Dim csReadLine As New
 CodeMethodInvokeExpression( _
                csSystemConsoleType, "ReadLine")

            ' Add the ReadLine statement.
            start.Statements.Add(csReadLine)

            ' Add the code entry point method to
            ' the Members collection of the type.
            class1.Members.Add(start)

            Return compileUnit
        End Function

        Public Shared Sub
 GenerateCode(ByVal provider As CodeDomProvider,
 ByVal compileunit As CodeCompileUnit)

            ' Build the source file name with the appropriate
            ' language extension.
            Dim sourceFile As String
            If provider.FileExtension.StartsWith(".")
 Then
                sourceFile = "TestGraph" + provider.FileExtension
            Else
                sourceFile = "TestGraph." + provider.FileExtension
            End If

            ' Create an IndentedTextWriter, constructed with
            ' a StreamWriter to the source file.
            Dim tw As New
 IndentedTextWriter(New StreamWriter(sourceFile, False),
 "    ")
            ' Generate source code using the code generator.
            provider.GenerateCodeFromCompileUnit(compileunit, tw, New
 CodeGeneratorOptions())
            ' Close the output file.
            tw.Close()
        End Sub

        Public Shared Function
 CompileCode(ByVal provider As CodeDomProvider,
 _
                                           ByVal sourceFile As
 String, _
                                           ByVal exeFile As
 String) As CompilerResults

            ' Configure a CompilerParameters that links System.dll
            ' and produces the specified executable file.
            Dim referenceAssemblies As String()
 = {"System.dll"}
            Dim cp As New
 CompilerParameters(referenceAssemblies, exeFile, False)

            ' Generate an executable rather than a DLL file.
            cp.GenerateExecutable = True

            ' Invoke compilation.
            Dim cr As CompilerResults = provider.CompileAssemblyFromFile(cp,
 _
                sourceFile)
            ' Return the results of compilation.
            Return cr
        End Function
    End Class

    Public Class CodeDomExampleForm
        Inherits System.Windows.Forms.Form
        Private run_button As New
 System.Windows.Forms.Button()
        Private compile_button As New
 System.Windows.Forms.Button()
        Private generate_button As New
 System.Windows.Forms.Button()
        Private textBox1 As New
 System.Windows.Forms.TextBox()
        Private comboBox1 As New
 System.Windows.Forms.ComboBox()
        Private label1 As New
 System.Windows.Forms.Label()

        Private Sub generate_button_Click(ByVal
 sender As Object, ByVal
 e As System.EventArgs)
            Dim provider As CodeDomProvider
 = GetCurrentProvider()
            CodeDomExample.GenerateCode(provider, CodeDomExample.BuildHelloWorldGraph())

            ' Build the source file name with the appropriate
            ' language extension.
            Dim sourceFile As String
            If provider.FileExtension.StartsWith(".")
 Then
                sourceFile = "TestGraph" + provider.FileExtension
            Else
                sourceFile = "TestGraph." + provider.FileExtension
            End If

            ' Read in the generated source file and
            ' display the source text.
            Dim sr As New
 StreamReader(sourceFile)
            textBox1.Text = sr.ReadToEnd()
            sr.Close()
        End Sub

        Private Sub compile_button_Click(ByVal
 sender As Object, ByVal
 e As System.EventArgs)
            Dim provider As CodeDomProvider
 = GetCurrentProvider()

            ' Build the source file name with the appropriate
            ' language extension.
            Dim sourceFile As String
            If provider.FileExtension.StartsWith(".")
 Then
                sourceFile = "TestGraph" + provider.FileExtension
            Else
                sourceFile = "TestGraph." + provider.FileExtension
            End If

            Dim cr As CompilerResults = CodeDomExample.CompileCode(provider,
 _
                                                                   sourceFile, _
                                                                   "TestGraph.EXE")

            If cr.Errors.Count > 0 Then
                ' Display compilation errors.
                textBox1.Text = "Errors encountered while building
 " + _
                                sourceFile + " into "
 + _
                                cr.PathToAssembly + ": "
 + ControlChars.CrLf

                Dim ce As System.CodeDom.Compiler.CompilerError
                For Each ce In
 cr.Errors
                    textBox1.AppendText(ce.ToString() + ControlChars.CrLf)
                Next ce
                run_button.Enabled = False
            Else
                textBox1.Text = "Source " + sourceFile
 + " built into " + _
                                cr.PathToAssembly + " with no
 errors."
                run_button.Enabled = True
            End If
        End Sub

        Private Sub run_button_Click(ByVal
 sender As Object, _
            ByVal e As System.EventArgs)

            Process.Start("TestGraph.EXE")
        End Sub

        Private Function GetCurrentProvider()
 As CodeDomProvider

            Dim provider As CodeDomProvider
            Select Case CStr(Me.comboBox1.SelectedItem)
                Case "CSharp"
                    provider = New CSharpCodeProvider()
                Case "Visual Basic"
                    provider = New VBCodeProvider()
                Case "JScript"
                    provider = New JScriptCodeProvider()
                Case Else
                    provider = New CSharpCodeProvider()
            End Select
            Return provider
        End Function

        Public Sub New()
            Me.SuspendLayout()
            ' Set properties for label1.
            Me.label1.Location = New System.Drawing.Point(395,
 20)
            Me.label1.Size = New Size(180,
 22)
            Me.label1.Text = "Select a programming
 language:"
            ' Set properties for comboBox1.
            Me.comboBox1.Location = New System.Drawing.Point(560,
 16)
            Me.comboBox1.Size = New Size(190,
 23)
            Me.comboBox1.Name = "comboBox1"
            Me.comboBox1.Items.AddRange(New
 String() {"CSharp", "Visual
 Basic", "JScript"})
            Me.comboBox1.Anchor = System.Windows.Forms.AnchorStyles.Left
 Or System.Windows.Forms.AnchorStyles.Right Or
 System.Windows.Forms.AnchorStyles.Top
            Me.comboBox1.SelectedIndex = 0
            ' Set properties for generate_button.
            Me.generate_button.Location = New
 System.Drawing.Point(8, 16)
            Me.generate_button.Name = "generate_button"
            Me.generate_button.Size = New System.Drawing.Size(120,
 23)
            Me.generate_button.Text = "Generate
 Code"
            AddHandler generate_button.Click, AddressOf
 Me.generate_button_Click
            ' Set properties for compile_button.
            Me.compile_button.Location = New
 System.Drawing.Point(136, 16)
            Me.compile_button.Name = "compile_button"
            Me.compile_button.Size = New System.Drawing.Size(120,
 23)
            Me.compile_button.Text = "Compile"
            AddHandler compile_button.Click, AddressOf
 Me.compile_button_Click
            ' Set properties for run_button.
            Me.run_button.Enabled = False
            Me.run_button.Location = New System.Drawing.Point(264,
 16)
            Me.run_button.Name = "run_button"
            Me.run_button.Size = New System.Drawing.Size(120,
 23)
            Me.run_button.Text = "Run"
            AddHandler run_button.Click, AddressOf
 Me.run_button_Click
            ' Set properties for textBox1.
            Me.textBox1.Anchor = System.Windows.Forms.AnchorStyles.Top
 Or System.Windows.Forms.AnchorStyles.Bottom Or
 System.Windows.Forms.AnchorStyles.Left Or System.Windows.Forms.AnchorStyles.Right
            Me.textBox1.Location = New System.Drawing.Point(8,
 48)
            Me.textBox1.Multiline = True
            Me.textBox1.ScrollBars = System.Windows.Forms.ScrollBars.Vertical
            Me.textBox1.Name = "textBox1"
            Me.textBox1.Size = New System.Drawing.Size(744,
 280)
            Me.textBox1.Text = ""
            ' Set properties for the CodeDomExampleForm.
            Me.AutoScaleBaseSize = New System.Drawing.Size(5,
 13)
            Me.ClientSize = New System.Drawing.Size(768,
 340)
            Me.MinimumSize = New System.Drawing.Size(750,
 340)
            Me.Controls.AddRange(New System.Windows.Forms.Control()
 {Me.textBox1, _
                Me.run_button, Me.compile_button,
 Me.generate_button, _
                Me.comboBox1, Me.label1})
            Me.Name = "CodeDomExampleForm"
            Me.Text = "CodeDom Hello World
 Example"
            Me.ResumeLayout(False)
        End Sub

        Protected Overloads Sub
 Dispose(ByVal disposing As Boolean)
            MyBase.Dispose(disposing)
        End Sub

        <STAThread()> _
        Shared Sub Main()
            Application.Run(New CodeDomExampleForm())
        End Sub
    End Class
End Namespace
using System;
using System.CodeDom;
using System.CodeDom.Compiler;
using System.Collections;
using System.ComponentModel;
using System.Diagnostics;
using System.Drawing;
using System.IO;
using System.Windows.Forms;
using Microsoft.CSharp;
using Microsoft.VisualBasic;
using Microsoft.JScript;

// This example demonstrates building a Hello World program graph 
// using System.CodeDom elements. It calls code generator and
// code compiler methods to build the program using CSharp, VB, or
// JScript.  A Windows Forms interface is included. Note: Code
// must be compiled and linked with the Microsoft.JScript assembly.
 
namespace CodeDOMExample
{
    class CodeDomExample
    {
        // Build a Hello World program graph using 
        // System.CodeDom types.
        public static CodeCompileUnit BuildHelloWorldGraph()
        {
            // Create a new CodeCompileUnit to contain 
            // the program graph.
            CodeCompileUnit compileUnit = new CodeCompileUnit();

            // Declare a new namespace called Samples.
            CodeNamespace samples = new CodeNamespace("Samples");
            // Add the new namespace to the compile unit.
            compileUnit.Namespaces.Add(samples);

            // Add the new namespace import for the System namespace.
            samples.Imports.Add(new CodeNamespaceImport("System"));

            // Declare a new type called Class1.
            CodeTypeDeclaration class1 = new CodeTypeDeclaration("Class1");
            // Add the new type to the namespace type collection.
            samples.Types.Add(class1);

            // Declare a new code entry point method.
            CodeEntryPointMethod start = new CodeEntryPointMethod();

            // Create a type reference for the System.Console class.
            CodeTypeReferenceExpression csSystemConsoleType = new
 CodeTypeReferenceExpression("System.Console");

            // Build a Console.WriteLine statement.
            CodeMethodInvokeExpression cs1 = new CodeMethodInvokeExpression(
                csSystemConsoleType, "WriteLine",
                new CodePrimitiveExpression("Hello World!"));

            // Add the WriteLine call to the statement collection.
            start.Statements.Add(cs1);

            // Build another Console.WriteLine statement.
            CodeMethodInvokeExpression cs2 = new CodeMethodInvokeExpression(
                csSystemConsoleType, "WriteLine",
                new CodePrimitiveExpression("Press the Enter
 key to continue."));

            // Add the WriteLine call to the statement collection.
            start.Statements.Add(cs2);

            // Build a call to System.Console.ReadLine.
            CodeMethodInvokeExpression csReadLine = new CodeMethodInvokeExpression(
                csSystemConsoleType, "ReadLine");

            // Add the ReadLine statement.
            start.Statements.Add(csReadLine);

            // Add the code entry point method to
            // the Members collection of the type.
            class1.Members.Add(start);

            return compileUnit;
        }

        public static void
 GenerateCode(CodeDomProvider provider,
            CodeCompileUnit compileunit)
        {
            // Build the source file name with the appropriate
            // language extension.
            String sourceFile;
            if (provider.FileExtension[0] == '.')
            {
                sourceFile = "TestGraph" + provider.FileExtension;
            }
            else
            {
                sourceFile = "TestGraph." + provider.FileExtension;
            }

            // Create an IndentedTextWriter, constructed with
            // a StreamWriter to the source file.
            IndentedTextWriter tw = new IndentedTextWriter(new
 StreamWriter(sourceFile, false), "    ");
            // Generate source code using the code generator.
            provider.GenerateCodeFromCompileUnit(compileunit, tw, new
 CodeGeneratorOptions());
            // Close the output file.
            tw.Close();
        }

        public static CompilerResults CompileCode(CodeDomProvider
 provider,
                                                  String sourceFile,
                                                  String exeFile)
        {
            // Configure a CompilerParameters that links System.dll
            // and produces the specified executable file.
            String[] referenceAssemblies = { "System.dll" };
            CompilerParameters cp = new CompilerParameters(referenceAssemblies
,
                                                           exeFile, false);
            // Generate an executable rather than a DLL file.
            cp.GenerateExecutable = true;

            // Invoke compilation.
            CompilerResults cr = provider.CompileAssemblyFromFile(cp, sourceFile);
            // Return the results of compilation.
            return cr;
        }
    }

    public class CodeDomExampleForm : System.Windows.Forms.Form
    {
        private System.Windows.Forms.Button run_button = new
 System.Windows.Forms.Button();
        private System.Windows.Forms.Button compile_button = new
 System.Windows.Forms.Button();
        private System.Windows.Forms.Button generate_button =
 new System.Windows.Forms.Button();
        private System.Windows.Forms.TextBox textBox1 = new
 System.Windows.Forms.TextBox();
        private System.Windows.Forms.ComboBox comboBox1 = new
 System.Windows.Forms.ComboBox();
        private System.Windows.Forms.Label label1 = new
 System.Windows.Forms.Label();

        private void generate_button_Click(object
 sender, System.EventArgs e)
        {
            CodeDomProvider provider = GetCurrentProvider();
            CodeDomExample.GenerateCode(provider, CodeDomExample.BuildHelloWorldGraph());

            // Build the source file name with the appropriate
            // language extension.
            String sourceFile;
            if (provider.FileExtension[0] == '.')
            {
                sourceFile = "TestGraph" + provider.FileExtension;
            }
            else
            {
                sourceFile = "TestGraph." + provider.FileExtension;
            }

            // Read in the generated source file and
            // display the source text.
            StreamReader sr = new StreamReader(sourceFile);
            textBox1.Text = sr.ReadToEnd();
            sr.Close();
        }

        private void compile_button_Click(object
 sender, System.EventArgs e)
        {
            CodeDomProvider provider = GetCurrentProvider();

            // Build the source file name with the appropriate
            // language extension.
            String sourceFile;
            if (provider.FileExtension[0] == '.')
            {
                sourceFile = "TestGraph" + provider.FileExtension;
            }
            else
            {
                sourceFile = "TestGraph." + provider.FileExtension;
            }

            // Compile the source file into an executable output file.
            CompilerResults cr = CodeDomExample.CompileCode(provider,
                                                            sourceFile,
                                                            "TestGraph.exe");

            if (cr.Errors.Count > 0)
            {
                // Display compilation errors.
                textBox1.Text = "Errors encountered while
 building " +
                                sourceFile + " into " + cr.PathToAssembly
 + ": \r\n\n";
                foreach (CompilerError ce in
 cr.Errors)
                    textBox1.AppendText(ce.ToString() + "\r\n");
                run_button.Enabled = false;
            }
            else
            {
                textBox1.Text = "Source " + sourceFile + " built into
 " +
                                cr.PathToAssembly + " with no errors.";
                run_button.Enabled = true;
            }
        }

        private void run_button_Click(object
 sender,
            System.EventArgs e)
        {
            Process.Start("TestGraph.exe");
        }

        private CodeDomProvider GetCurrentProvider()
        {
            CodeDomProvider provider;
            switch ((string)this.comboBox1.SelectedItem)
            {
                case "CSharp":
                    provider = new CSharpCodeProvider();
                    break;
                case "Visual Basic":
                    provider = new VBCodeProvider();
                    break;
                case "JScript":
                    provider = new JScriptCodeProvider();
                    break;
                default:
                    provider = new CSharpCodeProvider();
                    break;
            }
            return provider;
        }

        public CodeDomExampleForm()
        {
            this.SuspendLayout();
            // Set properties for label1
            this.label1.Location = new System.Drawing.Point(395,
 20);
            this.label1.Size = new Size(180,
 22);
            this.label1.Text = "Select a programming language:";
            // Set properties for comboBox1
            this.comboBox1.Location = new System.Drawing.Point(560,
 16);
            this.comboBox1.Size = new Size(190,
 23);
            this.comboBox1.Name = "comboBox1";
            this.comboBox1.Items.AddRange(new
 string[] { "CSharp", "Visual Basic", "JScript"
 });
            this.comboBox1.Anchor = System.Windows.Forms.AnchorStyles.Left
                                    | System.Windows.Forms.AnchorStyles.Right
                                    | System.Windows.Forms.AnchorStyles.Top;
            this.comboBox1.SelectedIndex = 0;
            // Set properties for generate_button. 
            this.generate_button.Location = new
 System.Drawing.Point(8, 16);
            this.generate_button.Name = "generate_button";
            this.generate_button.Size = new
 System.Drawing.Size(120, 23);
            this.generate_button.Text = "Generate Code";
            this.generate_button.Click += new
 System.EventHandler(this.generate_button_Click);
            // Set properties for compile_button.
            this.compile_button.Location = new
 System.Drawing.Point(136, 16);
            this.compile_button.Name = "compile_button";
            this.compile_button.Size = new
 System.Drawing.Size(120, 23);
            this.compile_button.Text = "Compile";
            this.compile_button.Click += new
 System.EventHandler(this.compile_button_Click);
            // Set properties for run_button.
            this.run_button.Enabled = false;
            this.run_button.Location = new
 System.Drawing.Point(264, 16);
            this.run_button.Name = "run_button";
            this.run_button.Size = new System.Drawing.Size(120,
 23);
            this.run_button.Text = "Run";
            this.run_button.Click += new System.EventHandler(this.run_button_Click);
            // Set properties for textBox1.        
            this.textBox1.Anchor = (System.Windows.Forms.AnchorStyles.Top
                                     | System.Windows.Forms.AnchorStyles.Bottom
                                     | System.Windows.Forms.AnchorStyles.Left
                                     | System.Windows.Forms.AnchorStyles.Right);
            this.textBox1.Location = new System.Drawing.Point(8,
 48);
            this.textBox1.Multiline = true;
            this.textBox1.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
            this.textBox1.Name = "textBox1";
            this.textBox1.Size = new System.Drawing.Size(744,
 280);
            this.textBox1.Text = "";
            // Set properties for the CodeDomExampleForm.
            this.AutoScaleBaseSize = new System.Drawing.Size(5,
 13);
            this.ClientSize = new System.Drawing.Size(768,
 340);
            this.MinimumSize = new System.Drawing.Size(750,
 340);
            this.Controls.AddRange(new System.Windows.Forms.Control[]
 {this.textBox1, 
                this.run_button, this.compile_button,
 this.generate_button,
                this.comboBox1, this.label1
 });
            this.Name = "CodeDomExampleForm";
            this.Text = "CodeDom Hello World Example";
            this.ResumeLayout(false);
        }

        protected override void Dispose(bool
 disposing)
        {
            base.Dispose(disposing);
        }

        [STAThread]
        static void Main()
        {
            Application.Run(new CodeDomExampleForm());
        }
    }
}
#using <System.Windows.Forms.dll>
#using <System.Drawing.dll>
#using <System.dll>
#using <Microsoft.JScript.dll>
#using <Cscompmgd.dll>

using namespace System;
using namespace System::CodeDom;
using namespace System::CodeDom::Compiler;
using namespace System::Collections;
using namespace System::ComponentModel;
using namespace System::Diagnostics;
using namespace System::Drawing;
using namespace System::IO;
using namespace System::Windows::Forms;
using namespace Microsoft::CSharp;
using namespace Microsoft::VisualBasic;
using namespace Microsoft::JScript;
using namespace System::Security::Permissions;

// This example demonstrates building a Hello World program graph 
// using System.CodeDom elements. It calls code generator and
// code compiler methods to build the program using CSharp, VB, or
// JScript.  A Windows Forms interface is included. Note: Code
// must be compiled and linked with the Microsoft.JScript assembly.
 
namespace CodeDOMExample
{
    [PermissionSet(SecurityAction::Demand, Name="FullTrust")]
    public ref class CodeDomExample
    {
    public:
        // Build a Hello World program graph using 
        // System::CodeDom types.
        static CodeCompileUnit^ BuildHelloWorldGraph()
        {
            // Create a new CodeCompileUnit to contain 
            // the program graph.
            CodeCompileUnit^ compileUnit = gcnew CodeCompileUnit;

            // Declare a new namespace called Samples.
            CodeNamespace^ samples = gcnew CodeNamespace( "Samples" );

            // Add the new namespace to the compile unit.
            compileUnit->Namespaces->Add( samples );

            // Add the new namespace import for the System namespace.
            samples->Imports->Add( gcnew CodeNamespaceImport( "System"
 ) );

            // Declare a new type called Class1.
            CodeTypeDeclaration^ class1 = gcnew CodeTypeDeclaration( "Class1"
 );

            // Add the new type to the namespace's type collection.
            samples->Types->Add( class1 );

            // Declare a new code entry point method.
            CodeEntryPointMethod^ start = gcnew CodeEntryPointMethod;

            // Create a type reference for the System::Console class.
            CodeTypeReferenceExpression^ csSystemConsoleType = gcnew CodeTypeReferenceExpression(
 "System.Console" );

            // Build a Console::WriteLine statement.
            CodeMethodInvokeExpression^ cs1 = gcnew CodeMethodInvokeExpression( csSystemConsoleType,"WriteLine",
 gcnew CodePrimitiveExpression("Hello World!") );

            // Add the WriteLine call to the statement collection.
            start->Statements->Add( cs1 );

            // Build another Console::WriteLine statement.
            CodeMethodInvokeExpression^ cs2 = gcnew CodeMethodInvokeExpression( csSystemConsoleType,"WriteLine",
 gcnew CodePrimitiveExpression( "Press the Enter key to continue." ) );

            // Add the WriteLine call to the statement collection.
            start->Statements->Add( cs2 );

            // Build a call to System::Console::ReadLine.
            CodeMethodReferenceExpression^ csReadLine = gcnew CodeMethodReferenceExpression(
 csSystemConsoleType, "ReadLine" );
            CodeMethodInvokeExpression^ cs3 = gcnew CodeMethodInvokeExpression( csReadLine,
 gcnew array<CodeExpression^>(0) );

            // Add the ReadLine statement.
            start->Statements->Add( cs3 );

            // Add the code entry point method to
            // the Members collection of the type.
            class1->Members->Add( start );
            return compileUnit;
        }

        static void GenerateCode( CodeDomProvider^
 provider, CodeCompileUnit^ compileunit )
        {
            // Build the source file name with the appropriate
            // language extension.
            String^ sourceFile;
            if ( provider->FileExtension->StartsWith( "."
 ) )
            {
                sourceFile = String::Concat( "TestGraph", provider->FileExtension
 );
            }
            else
            {
                sourceFile = String::Concat( "TestGraph.", provider->FileExtension
 );
            }

            // Create an IndentedTextWriter, constructed with
            // a StreamWriter to the source file.
            IndentedTextWriter^ tw = gcnew IndentedTextWriter( gcnew StreamWriter(
 sourceFile,false ),"    " );

            // Generate source code using the code generator.
            provider->GenerateCodeFromCompileUnit( compileunit, tw, gcnew CodeGeneratorOptions
 );

            // Close the output file.
            tw->Close();
        }

        static CompilerResults^ CompileCode( CodeDomProvider^
 provider, String^ sourceFile, String^ exeFile )
        {
            // Configure a CompilerParameters that links System.dll
            // and produces the specified executable file.
            array<String^>^referenceAssemblies = {"System.dll"};
            CompilerParameters^ cp = gcnew CompilerParameters( referenceAssemblies,exeFile,false
 );

            // Generate an executable rather than a DLL file.
            cp->GenerateExecutable = true;

            // Invoke compilation.
            CompilerResults^ cr = provider->CompileAssemblyFromFile( cp, sourceFile
 );

            // Return the results of compilation.
            return cr;
        }
    };

    public ref class CodeDomExampleForm: public
 System::Windows::Forms::Form
    {
    private:
        static System::Windows::Forms::Button^ run_button = gcnew
 System::Windows::Forms::Button;
        static System::Windows::Forms::Button^ compile_button
 = gcnew System::Windows::Forms::Button;
        static System::Windows::Forms::Button^ generate_button
 = gcnew System::Windows::Forms::Button;
        static System::Windows::Forms::TextBox^ textBox1 = gcnew
 System::Windows::Forms::TextBox;
        static System::Windows::Forms::ComboBox^ comboBox1 = gcnew
 System::Windows::Forms::ComboBox;
        static System::Windows::Forms::Label^ label1 = gcnew System::Windows::Forms::Label;
        void generate_button_Click( Object^ /*sender*/, System::EventArgs^
 /*e*/ )
        {
            CodeDomProvider^ provider = GetCurrentProvider();
            CodeDomExample::GenerateCode( provider, CodeDomExample::BuildHelloWorldGraph()
 );

            // Build the source file name with the appropriate
            // language extension.
            String^ sourceFile;
            if ( provider->FileExtension->StartsWith( "."
 ) )
            {
                sourceFile = String::Concat( "TestGraph", provider->FileExtension
 );
            }
            else
            {
                sourceFile = String::Concat( "TestGraph.", provider->FileExtension
 );
            }


            // Read in the generated source file and
            // display the source text.
            StreamReader^ sr = gcnew StreamReader( sourceFile );
            textBox1->Text = sr->ReadToEnd();
            sr->Close();
        }

        CodeDomProvider^ GetCurrentProvider()
        {
            CodeDomProvider^ provider;
            if ( String::Compare( dynamic_cast<String^>(this->comboBox1->SelectedItem),
 "CSharp" ) == 0 )
                provider = gcnew CSharpCodeProvider;
            else
                if ( String::Compare( dynamic_cast<String^>(this->comboBox1->SelectedItem),
 "Visual Basic" ) == 0 )
                    provider = gcnew VBCodeProvider;
                else
                    if ( String::Compare( dynamic_cast<String^>(this->comboBox1->SelectedItem),
 "JScript" ) == 0 )
                        provider = gcnew JScriptCodeProvider;
                    else
                        provider = gcnew CSharpCodeProvider;

            return provider;
        }

        void compile_button_Click( Object^ /*sender*/, System::EventArgs^
 /*e*/ )
        {
            CodeDomProvider^ provider = GetCurrentProvider();

            // Build the source file name with the appropriate
            // language extension.
            String^ sourceFile = String::Concat( "TestGraph.", provider->FileExtension
 );

            // Compile the source file into an executable output file.
            CompilerResults^ cr = CodeDomExample::CompileCode( provider, sourceFile,
 "TestGraph.exe" );
            if ( cr->Errors->Count > 0 )
            {
                // Display compilation errors.
                textBox1->Text = String::Concat( "Errors encountered while
 building ", sourceFile, " into ", cr->PathToAssembly, ":
 \r\n\n" );
                System::CodeDom::Compiler::CompilerError^ ce;
                for ( int i = 0; i < cr->Errors->Count;
 i++ )
                {
                    ce = cr->Errors[i];
                    textBox1->AppendText( String::Concat( ce->ToString(), "\r\n"
 ) );

                }
                run_button->Enabled = false;
            }
            else
            {
                textBox1->Text = String::Concat( "Source ", sourceFile,
 " built into ", cr->PathToAssembly, " with no errors." );
                run_button->Enabled = true;
            }
        }

        void run_button_Click( Object^ /*sender*/, System::EventArgs^
 /*e*/ )
        {
            Process::Start( "TestGraph.exe" );
        }

    public:
        CodeDomExampleForm()
        {
            this->SuspendLayout();

            // Set properties for label1.
            this->label1->Location = System::Drawing::Point(
 395, 20 );
            this->label1->Size = System::Drawing::Size(
 180, 22 );
            this->label1->Text = "Select a programming
 language:";

            // Set properties for comboBox1.
            this->comboBox1->Location = System::Drawing::Point(
 560, 16 );
            this->comboBox1->Size = System::Drawing::Size(
 190, 23 );
            this->comboBox1->Name = "comboBox1";
            array<String^>^temp1 = {"CSharp","Visual Basic"
,"JScript"};
            this->comboBox1->Items->AddRange( temp1 );
            this->comboBox1->Anchor = (System::Windows::Forms::AnchorStyles)(System::Windows::Forms::AnchorStyles::Left
 | System::Windows::Forms::AnchorStyles::Right | System::Windows::Forms::AnchorStyles::Top);
            this->comboBox1->SelectedIndex = 0;

            // Set properties for generate_button.
            this->generate_button->Location = System::Drawing::Point(
 8, 16 );
            this->generate_button->Name = "generate_button";
            this->generate_button->Size = System::Drawing::Size(
 120, 23 );
            this->generate_button->Text = "Generate
 Code";
            this->generate_button->Click += gcnew System::EventHandler(
 this, &CodeDomExampleForm::generate_button_Click );

            // Set properties for compile_button.
            this->compile_button->Location = System::Drawing::Point(
 136, 16 );
            this->compile_button->Name = "compile_button";
            this->compile_button->Size = System::Drawing::Size(
 120, 23 );
            this->compile_button->Text = "Compile";
            this->compile_button->Click += gcnew System::EventHandler(
 this, &CodeDomExampleForm::compile_button_Click );

            // Set properties for run_button.
            this->run_button->Enabled = false;
            this->run_button->Location = System::Drawing::Point(
 264, 16 );
            this->run_button->Name = "run_button";
            this->run_button->Size = System::Drawing::Size(
 120, 23 );
            this->run_button->Text = "Run";
            this->run_button->Click += gcnew System::EventHandler(
 this, &CodeDomExampleForm::run_button_Click );

            // Set properties for textBox1.
            this->textBox1->Anchor = (System::Windows::Forms::AnchorStyles)(System::Windows::Forms::AnchorStyles::Top
 | System::Windows::Forms::AnchorStyles::Bottom | System::Windows::Forms::AnchorStyles::Left
 | System::Windows::Forms::AnchorStyles::Right);
            this->textBox1->Location = System::Drawing::Point(
 8, 48 );
            this->textBox1->Multiline = true;
            this->textBox1->ScrollBars = System::Windows::Forms::ScrollBars::Vertical;
            this->textBox1->Name = "textBox1";
            this->textBox1->Size = System::Drawing::Size(
 744, 280 );
            this->textBox1->Text = "";

            // Set properties for the CodeDomExampleForm.
            this->AutoScaleBaseSize = System::Drawing::Size(
 5, 13 );
            this->ClientSize = System::Drawing::Size( 768,
 340 );
            this->MinimumSize = System::Drawing::Size( 750,
 340 );
            array<System::Windows::Forms::Control^>^myControl = {this->textBox1
,this->run_button,this->compile_button
,this->generate_button,this->comboBox1,this->label1};
            this->Controls->AddRange( myControl );
            this->Name = "CodeDomExampleForm";
            this->Text = "CodeDom Hello World Example";
            this->ResumeLayout( false );
        }

    public:
        ~CodeDomExampleForm()
        {
        }
    };

}

[STAThread]
int main()
{
    Application::Run( gcnew CodeDOMExample::CodeDomExampleForm );
}
.NET Framework のセキュリティ.NET Frameworkセキュリティ
継承階層継承階層
System.Object
   System.MarshalByRefObject
     System.ComponentModel.Component
      System.CodeDom.Compiler.CodeDomProvider
         Microsoft.CSharp.CSharpCodeProvider
         Microsoft.JScript.JScriptCodeProvider
         Microsoft.VisualBasic.VBCodeProvider
         Microsoft.VisualC.CppCodeProvider
スレッド セーフスレッド セーフ
この型の public static (Visual Basic では Shared) メンバはすべて、スレッド セーフです。インスタンス メンバ場合は、スレッド セーフであるとは限りません。
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
CodeDomProvider メンバ
System.CodeDom.Compiler 名前空間
CompilerInfo
CSharpCodeProvider
VBCodeProvider
JScriptCodeProvider
その他の技術情報
コンパイラおよび言語プロバイダ設定スキーマ

CodeDomProvider コンストラクタ


CodeDomProvider プロパティ


CodeDomProvider メソッド


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

( プロテクト メソッド参照)
  名前 説明
パブリック メソッド CompileAssemblyFromDom 指定したコンパイラ設定使用して指定した CodeCompileUnit オブジェクト配列含まれている System.CodeDom ツリー基づいてアセンブリコンパイルます。
パブリック メソッド CompileAssemblyFromFile 指定したコンパイラ設定使用して指定したファイル格納されているソース コードからアセンブリコンパイルます。
パブリック メソッド CompileAssemblyFromSource 指定したコンパイラ設定使用してソース コード格納されている指定した文字列配列からアセンブリコンパイルます。
パブリック メソッド CreateCompiler 派生クラスオーバーライドされると、新しコード コンパイラ作成します
パブリック メソッド CreateEscapedIdentifier 指定した値のエスケープ識別子作成します
パブリック メソッド CreateGenerator オーバーロードされます派生クラスオーバーライドされると、新しコード ジェネレータ作成します
パブリック メソッド CreateObjRef  リモート オブジェクトとの通信使用するプロキシ生成必要な情報をすべて格納しているオブジェクト作成します。 ( MarshalByRefObject から継承されます。)
パブリック メソッド CreateParser 派生クラスオーバーライドされると、新しコード パーサー作成します
パブリック メソッド CreateProvider 指定した言語の CodeDomProvider インスタンス取得します
パブリック メソッド CreateValidIdentifier 指定した値の有効な識別子作成します
パブリック メソッド Dispose  オーバーロードされますComponent によって使用されているリソース解放します。 ( Component から継承されます。)
パブリック メソッド Equals  オーバーロードされます2 つObject インスタンス等しかどうか判断します。 ( Object から継承されます。)
パブリック メソッド GenerateCodeFromCompileUnit 指定した CodeDOM (Code Document Object Model) コンパイル単位コード生成し指定したオプション使用して指定したテキスト ライタ生成されコード送信します
パブリック メソッド GenerateCodeFromExpression 指定した CodeDOM (Code Document Object Model) 式のコード生成し指定したオプション使用して指定したテキスト ライタ生成されコード送信します
パブリック メソッド GenerateCodeFromMember 指定した CodeDOM (Code Document Object Model) メンバ宣言コード生成し指定したオプション使用して指定したテキスト ライタ生成されコード送信します
パブリック メソッド GenerateCodeFromNamespace 指定した CodeDOM (Code Document Object Model) 名前空間コード生成し指定したオプション使用して指定したテキスト ライタ生成されコード送信します
パブリック メソッド GenerateCodeFromStatement 指定した CodeDOM (Code Document Object Model) ステートメントコード生成し指定したオプション使用して指定したテキスト ライタ生成されコード送信します
パブリック メソッド GenerateCodeFromType 指定した CodeDOM (Code Document Object Model) 型宣言コード生成し指定したオプション使用して指定したテキスト ライタ生成されコード送信します
パブリック メソッド GetAllCompilerInfo このコンピュータ言語プロバイダおよびコンパイラ構成設定返します
パブリック メソッド GetCompilerInfo 指定した言語言語プロバイダおよびコンパイラ構成設定返します
パブリック メソッド GetConverter 指定したデータ ソースの TypeConverter を取得します
パブリック メソッド GetHashCode  特定の型のハッシュ関数として機能します。GetHashCode は、ハッシュ アルゴリズムや、ハッシュ テーブルのようなデータ構造での使用適してます。 ( Object から継承されます。)
パブリック メソッド GetLanguageFromExtension CodeDomProviderコンパイラ構成セクション構成されている、指定したファイル名拡張子関連付けられた言語名返します
パブリック メソッド GetLifetimeService  対象インスタンス有効期間ポリシー制御する現在の有効期間サービス オブジェクト取得します。 ( MarshalByRefObject から継承されます。)
パブリック メソッド GetType  現在のインスタンスType取得します。 ( Object から継承されます。)
パブリック メソッド GetTypeOutput 指定した CodeTypeReference で示される型を取得します
パブリック メソッド InitializeLifetimeService  対象インスタンス有効期間ポリシー制御する有効期間サービス オブジェクト取得します。 ( MarshalByRefObject から継承されます。)
パブリック メソッド IsDefinedExtension コンピュータ上に、ファイル名拡張子関連する CodeDomProvider 実装構成されているかどうか調べます
パブリック メソッド IsDefinedLanguage コンピュータ上に、言語CodeDomProvider 実装構成されているかどうか調べます
パブリック メソッド IsValidIdentifier 指定した値が現在の言語有効な識別子かどうかを示す値を返します
パブリック メソッド Parse 指定したテキスト ストリームから読み取ったコードCodeCompileUnitコンパイルます。
パブリック メソッド ReferenceEquals  指定した複数Object インスタンス同一かどうか判断します。 ( Object から継承されます。)
パブリック メソッド Supports 指定したコード生成できるかどうかを示す値を返します
パブリック メソッド ToString  Component の名前を格納している String返します (存在する場合)。このメソッドオーバーライドできません。 ( Component から継承されます。)
プロテクト メソッドプロテクト メソッド
参照参照

関連項目

CodeDomProvider クラス
System.CodeDom.Compiler 名前空間
CompilerInfo
CSharpCodeProvider
VBCodeProvider
JScriptCodeProvider

その他の技術情報

コンパイラおよび言語プロバイダ設定スキーマ

CodeDomProvider メンバ

CodeDomProvider の実装基本クラス提供します。このクラス抽象クラスです。

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


プロテクト コンストラクタプロテクト コンストラクタ
  名前 説明
プロテクト メソッド CodeDomProvider CodeDomProvider クラス新しインスタンス初期化します。
パブリック プロパティパブリック プロパティ
プロテクト プロパティプロテクト プロパティ
パブリック メソッドパブリック メソッド
( プロテクト メソッド参照)
  名前 説明
パブリック メソッド CompileAssemblyFromDom 指定したコンパイラ設定使用して指定した CodeCompileUnit オブジェクト配列含まれている System.CodeDom ツリー基づいてアセンブリコンパイルます。
パブリック メソッド CompileAssemblyFromFile 指定したコンパイラ設定使用して指定したファイル格納されているソース コードからアセンブリコンパイルます。
パブリック メソッド CompileAssemblyFromSource 指定したコンパイラ設定使用してソース コード格納されている指定した文字列配列からアセンブリコンパイルます。
パブリック メソッド CreateCompiler 派生クラスオーバーライドされると、新しコード コンパイラ作成します
パブリック メソッド CreateEscapedIdentifier 指定した値のエスケープ識別子作成します
パブリック メソッド CreateGenerator オーバーロードされます派生クラスオーバーライドされると、新しコード ジェネレータ作成します
パブリック メソッド CreateObjRef  リモート オブジェクトとの通信使用するプロキシ生成必要な情報をすべて格納しているオブジェクト作成します。 (MarshalByRefObject から継承されます。)
パブリック メソッド CreateParser 派生クラスオーバーライドされると、新しコード パーサー作成します
パブリック メソッド CreateProvider 指定した言語CodeDomProvider インスタンス取得します
パブリック メソッド CreateValidIdentifier 指定した値の有効な識別子作成します
パブリック メソッド Dispose  オーバーロードされますComponent によって使用されているリソース解放します。 (Component から継承されます。)
パブリック メソッド Equals  オーバーロードされます2 つObject インスタンス等しかどうか判断します。 (Object から継承されます。)
パブリック メソッド GenerateCodeFromCompileUnit 指定した CodeDOM (Code Document Object Model) コンパイル単位コード生成し指定したオプション使用して指定したテキスト ライタ生成されコード送信します
パブリック メソッド GenerateCodeFromExpression 指定した CodeDOM (Code Document Object Model) 式のコード生成し指定したオプション使用して指定したテキスト ライタ生成されコード送信します
パブリック メソッド GenerateCodeFromMember 指定した CodeDOM (Code Document Object Model) メンバ宣言コード生成し指定したオプション使用して指定したテキスト ライタ生成されコード送信します
パブリック メソッド GenerateCodeFromNamespace 指定した CodeDOM (Code Document Object Model) 名前空間コード生成し指定したオプション使用して指定したテキスト ライタ生成されコード送信します
パブリック メソッド GenerateCodeFromStatement 指定した CodeDOM (Code Document Object Model) ステートメントコード生成し指定したオプション使用して指定したテキスト ライタ生成されコード送信します
パブリック メソッド GenerateCodeFromType 指定した CodeDOM (Code Document Object Model) 型宣言コード生成し指定したオプション使用して指定したテキスト ライタ生成されコード送信します
パブリック メソッド GetAllCompilerInfo このコンピュータ言語プロバイダおよびコンパイラ構成設定返します
パブリック メソッド GetCompilerInfo 指定した言語言語プロバイダおよびコンパイラ構成設定返します
パブリック メソッド GetConverter 指定したデータ ソースの TypeConverter を取得します
パブリック メソッド GetHashCode  特定の型のハッシュ関数として機能します。GetHashCode は、ハッシュ アルゴリズムや、ハッシュ テーブルのようなデータ構造での使用適してます。 (Object から継承されます。)
パブリック メソッド GetLanguageFromExtension CodeDomProviderコンパイラ構成セクション構成されている、指定したファイル名拡張子関連付けられた言語名返します
パブリック メソッド GetLifetimeService  対象インスタンス有効期間ポリシー制御する現在の有効期間サービス オブジェクト取得します。 (MarshalByRefObject から継承されます。)
パブリック メソッド GetType  現在のインスタンスType取得します。 (Object から継承されます。)
パブリック メソッド GetTypeOutput 指定した CodeTypeReference で示される型を取得します
パブリック メソッド InitializeLifetimeService  対象インスタンス有効期間ポリシー制御する有効期間サービス オブジェクト取得します。 (MarshalByRefObject から継承されます。)
パブリック メソッド IsDefinedExtension コンピュータ上に、ファイル名拡張子関連する CodeDomProvider 実装構成されているかどうか調べます
パブリック メソッド IsDefinedLanguage コンピュータ上に、言語CodeDomProvider 実装構成されているかどうか調べます
パブリック メソッド IsValidIdentifier 指定した値が現在の言語有効な識別子かどうかを示す値を返します
パブリック メソッド Parse 指定したテキスト ストリームから読み取ったコードCodeCompileUnitコンパイルます。
パブリック メソッド ReferenceEquals  指定した複数Object インスタンス同一かどうか判断します。 (Object から継承されます。)
パブリック メソッド Supports 指定したコード生成できるかどうかを示す値を返します
パブリック メソッド ToString  Component の名前を格納している String返します (存在する場合)。このメソッドオーバーライドできません。 (Component から継承されます。)
プロテクト メソッドプロテクト メソッド
パブリック イベントパブリック イベント
参照参照

関連項目

CodeDomProvider クラス
System.CodeDom.Compiler 名前空間
CompilerInfo
CSharpCodeProvider
VBCodeProvider
JScriptCodeProvider

その他の技術情報

コンパイラおよび言語プロバイダ設定スキーマ


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

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

辞書ショートカット

すべての辞書の索引

「CodeDomProvider」の関連用語

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

   

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



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

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

©2025 GRAS Group, Inc.RSS