Scenario:
You want to get the basic site usage information
Solution:
You can get the basic site usage information using UsageInfo structure of site.
Code:
SPSite oSiteCollection = SPContext.Current.Site;Article:
SPSite.UsageInfo oUsageInfo = oSiteCollection.Usage;
Int64 int64DiscussionStorage = oUsageInfo.DiscussionStorage;
Int64 int64Storage = oUsageInfo.Storage;
Int64 int64Bandwidth = oUsageInfo.Bandwidth;
Int64 int64Hits = oUsageInfo.Hits;
Int64 int64Visits = oUsageInfo.Visits;
http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spsite.usageinfo.aspx
0 comments:
Post a Comment