共用方式為


SPMeeting.GetMeetingInformation method

取得具有指定之網站的會議資訊SPMeeting物件。

Namespace:  Microsoft.SharePoint.Meetings
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'宣告
Public Shared Function GetMeetingInformation ( _
    web As SPWeb _
) As SPMeeting
'用途
Dim web As SPWeb
Dim returnValue As SPMeeting

returnValue = SPMeeting.GetMeetingInformation(web)
public static SPMeeting GetMeetingInformation(
    SPWeb web
)

參數

傳回值

Type: Microsoft.SharePoint.Meetings.SPMeeting
指定網站的會議資訊物件。

備註

GetMeetingInformation方法會傳回SPMeeting物件與會議的方法僅參數中指定的網站的相關資訊。如果您指定建立使用其中一個會議工作區範本的網站,您可以使用SPMeeting物件,會傳回要取得的工作區內容的相關資訊。您也可以指定不是在工作區本身的網站,但父代的節點是會議工作區網站的子網站。在此情況下,您可以使用SPMeeting物件傳回至呼叫GetWorkspacesToLinkTo(Boolean)方法,它會擷取SPWebCollection物件,其中包含會議工作區的子網站。

注意事項注意事項

GetMeetingInformation方法是唯一的方法,可以取得SPMeeting類別的執行個體。類別有無 public 建構函式。

Examples

下列範例會為主控台應用程式都會立即是網站集合中的根網站下的所有會議工作區網站。應用程式會在列印都會主控台每項工作的 URL。

Imports System
Imports Microsoft.SharePoint
Imports Microsoft.SharePoint.Meetings

Module ConsoleApp
   Sub Main()
      Using siteCollection As SPSite = New SPSite("https://localhost")
         Using rootWeb As SPWeb = siteCollection.RootWeb

            Dim web As SPWeb
            For Each web In rootWeb.Webs
               If SPMeeting.IsMeetingWorkspaceWeb(web) Then
                  ' Get a meeting object.
                  Dim meeting As SPMeeting = SPMeeting.GetMeetingInformation(web)

                  ' Print the workspace URL.
                  Dim url As String = web.Url + "/default.aspx?InstanceID=" + meeting.InstanceId.ToString()
                  Console.WriteLine(url)
               End If
               ' Clean up.
               web.Dispose()
            Next web

         End Using
      End Using
      Console.Write(vbCrLf + "Press ENTER to continue...")
      Console.ReadLine()
   End Sub
End Module
using System;
using Microsoft.SharePoint;
using Microsoft.SharePoint.Meetings;

namespace Test
{
   class ConsoleApp
   {
      static void Main(string[] args)
      {
         using (SPSite siteCollection = new SPSite("https://localhost"))
         {
            using (SPWeb rootWeb = siteCollection.RootWeb)
            {
               foreach (SPWeb web in rootWeb.Webs)
               {
                  if (SPMeeting.IsMeetingWorkspaceWeb(web))
                  {
                     // Get a meeting object.
                     SPMeeting meeting = SPMeeting.GetMeetingInformation(web);

                     // Print the workspace URL.
                     string url = web.Url + "/default.aspx?InstanceID=" + meeting.InstanceId.ToString();
                     Console.WriteLine(url);
                  }
                  // Clean up.
                  web.Dispose();
               }
            }
         }
         Console.Write("\nPress ENTER to continue...");
         Console.ReadLine();
      }
   }
}

請參閱

參照

SPMeeting class

SPMeeting members

Microsoft.SharePoint.Meetings namespace

IsMeetingWorkspaceWeb

GetWorkspacesToLinkTo