Share via


de la propiedad SPWeb.AllProperties

Obtiene una tabla hash que contiene metadatos para el sitio Web.

Espacio de nombres:  Microsoft.SharePoint
Ensamblado:  Microsoft.SharePoint (en Microsoft.SharePoint.dll)

Sintaxis

'Declaración
Public ReadOnly Property AllProperties As Hashtable
    Get
'Uso
Dim instance As SPWeb
Dim value As Hashtable

value = instance.AllProperties
public Hashtable AllProperties { get; }

Valor de propiedad

Tipo: System.Collections.Hashtable
Una tabla hash que contiene metadatos.

Comentarios

El almacenamiento de grandes amonts de datos en esta propiedad afectará negativamente al rendimiento. No almacene más de un kilobyte (1 KB) de datos de usuario en esta propiedad.

Ejemplos

En el siguiente ejemplo es una aplicación de consola que tiene acceso a la propiedad AllProperties de un sitio Web, recorre en iteración las entradas de la tabla hash e imprime cada par clave/valor a la consola.

using System;
using System.Collections;
using Microsoft.SharePoint;

namespace Test
{
    class Program
    {
        static void Main(string[] args)
        {
            using (SPSite site = new SPSite("https://localhost"))
            {
                using (SPWeb web = site.OpenWeb())
                {
                    Hashtable ht = web.AllProperties;
                    foreach (DictionaryEntry de in ht)
                    {
                        Console.WriteLine("Key = {0}, Value = {1}", de.Key, de.Value);
                    }
                }
            }
            Console.ReadLine();
        }
    }
}
Imports System
Imports System.Collections
Imports Microsoft.SharePoint

Namespace Test
    Friend Class Program
        Shared Sub Main(ByVal args() As String)
            Using site As New SPSite("https://localhost")
                Using web As SPWeb = site.OpenWeb()
                    Dim ht As Hashtable = web.AllProperties
                    For Each de As DictionaryEntry In ht
                        Console.WriteLine("Key = {0}, Value = {1}", de.Key, de.Value)
                    Next de
                End Using
            End Using
            Console.ReadLine()
        End Sub
    End Class
End Namespace

El resultado que la aplicación se escribe en la consola varía con el sitio Web, pero tiene un aspecto similar al siguiente:

Key = vti_associatemembergroup, Value = 5
Key = vti_extenderversion, Value = 14.0.0.4016
Key = vti_associatevisitorgroup, Value = 4
Key = vti_associategroups, Value = 5;4;3
Key = vti_createdassociategroups, Value = 3;4;5
Key = vti_approvallevels, Value = Approved Rejected Pending\ Review
Key = vti_categories, Value = Travel Expense\ Report Business Competition Goals/Objectives Ideas Miscellaneous Waiting VIP In\ Process Planning Schedule
Key = vti_siteusagetotalbandwidth, Value = 547
Key = vti_siteusagetotalvisits, Value = 9
Key = vti_associateownergroup, Value = 3
Key = vti_defaultlanguage, Value = en-us

Vea también

Referencia

clase SPWeb

Miembros SPWeb

Espacio de nombres Microsoft.SharePoint

Otros recursos

Metakeys