Get Namespaces

Get Namespaces

Namespaces

  • Provide a hierarchical structure of containers that are used to logically group classes related to the .NET Framework

Namespaces C# Web Control Code

Sitecore.Data.Items.Item item = this.GetItem();
if (item == null) return;

System.Reflection.Assembly assembly = System.Reflection.Assembly.Load("Sitecore.Kernel");
if (assembly == null) return;

System.Type[] types = assembly.GetTypes();
if (types == null) return;

System.Collections.Generic.List<string> nameSpaces = new System.Collections.Generic.List<string>();
foreach(var type in types)
    if(!nameSpaces.Contains(type.Namespace))
        nameSpaces.Add(type.Namespace);

var sortedList = (from entry in nameSpaces orderby entry ascending select entry);

output.AddAttribute(System.Web.UI.HtmlTextWriterAttribute.Style, "font-weight:bold; width:100%; clear:both");
output.RenderBeginTag(System.Web.UI.HtmlTextWriterTag.Div);
output.Write("C# Web Control Real-time Output");
output.RenderEndTag(); //Div

output.AddAttribute(System.Web.UI.HtmlTextWriterAttribute.Style, "font-size:x-small; width:100%; clear:both");
output.RenderBeginTag(System.Web.UI.HtmlTextWriterTag.Div);
output.AddAttribute(System.Web.UI.HtmlTextWriterAttribute.Style, "font-weight:bold");
output.RenderBeginTag(System.Web.UI.HtmlTextWriterTag.P);
//using &#58; for colon and &#160; for space
output.Write("{0}&#58;&#160;{1}", "Item", item.DisplayName);
output.RenderEndTag(); //P

foreach (var nameSpace in sortedList)
{
    output.Write("{0}", nameSpace + "<br/>");
}

output.RenderEndTag(); //Div


Namespaces C# Web Control Output

Sitecore
Sitecore.Access
Sitecore.ApplicationCenter
Sitecore.ApplicationCenter.Applications
Sitecore.ApplicationCenter.PagePreview
Sitecore.Caching
Sitecore.Caching.Generics
Sitecore.Caching.IsUserInRole
Sitecore.Caching.UserProfile
Sitecore.CodeDom
Sitecore.CodeDom.Compiler
Sitecore.CodeDom.Scripts
Sitecore.Collections
Sitecore.Collections.Extensions
Sitecore.Common
Sitecore.Configuration
Sitecore.Configuration.Providers
Sitecore.Configuration.Services
Sitecore.Data
Sitecore.Data.Archiving
Sitecore.Data.Clones
Sitecore.Data.Comparers
Sitecore.Data.Databases
Sitecore.Data.DataProviders
Sitecore.Data.DataProviders.Sql
Sitecore.Data.DataProviders.Sql.FastQuery
Sitecore.Data.DataProviders.SqlServer
Sitecore.Data.Engines
Sitecore.Data.Engines.Data
Sitecore.Data.Engines.DataCommands
Sitecore.Data.Eventing
Sitecore.Data.Eventing.Remote
Sitecore.Data.Events
Sitecore.Data.Fields
Sitecore.Data.IDTables
Sitecore.Data.Indexing
Sitecore.Data.Items
Sitecore.Data.Locking
Sitecore.Data.Managers
Sitecore.Data.Masters
Sitecore.Data.Proxies
Sitecore.Data.Query
Sitecore.Data.Serialization
Sitecore.Data.Serialization.Exceptions
Sitecore.Data.Serialization.ObjectModel
Sitecore.Data.Serialization.Presets
Sitecore.Data.Serialization.Templates
Sitecore.Data.Sql
Sitecore.Data.SqlServer
Sitecore.Data.Templates
Sitecore.Data.Treeviews
Sitecore.Data.Validators
Sitecore.Data.Validators.FieldValidators
Sitecore.Data.Validators.ItemValidators
Sitecore.Data.Views
Sitecore.Diagnostics
Sitecore.Diagnostics.Events
Sitecore.Diagnostics.PerformanceCounters
Sitecore.Drawing.Exif
Sitecore.Drawing.Exif.Attributes
Sitecore.Drawing.Exif.Properties
Sitecore.DynamicSerialization
Sitecore.Eventing
Sitecore.Eventing.Remote
Sitecore.Events
Sitecore.Events.Hooks
Sitecore.Exceptions
Sitecore.Express
Sitecore.Extensions
Sitecore.Extensions.DatabaseExtensions
Sitecore.Extensions.StringExtensions
Sitecore.Extensions.XElementExtensions
Sitecore.Globalization
Sitecore.ImageLib
Sitecore.Install
Sitecore.Install.BlobData
Sitecore.Install.Configuration
Sitecore.Install.Files
Sitecore.Install.Filters
Sitecore.Install.Framework
Sitecore.Install.Items
Sitecore.Install.Metadata
Sitecore.Install.Security
Sitecore.Install.Serialization
Sitecore.Install.Utils
Sitecore.Install.Zip
Sitecore.IntegratedSessionFix
Sitecore.IO
Sitecore.Jobs
Sitecore.Jobs.AsyncUI
Sitecore.Layouts
Sitecore.Layouts.PageExtenders
Sitecore.Links
Sitecore.localhost
Sitecore.Pipelines
Sitecore.Pipelines.Attach
Sitecore.Pipelines.ConvertToDesignTimeHtml
Sitecore.Pipelines.ConvertToRuntimeHtml
Sitecore.Pipelines.Dispatch
Sitecore.Pipelines.EndSession
Sitecore.Pipelines.ExecutePageEditorAction
Sitecore.Pipelines.ExpandBranchItemName
Sitecore.Pipelines.ExpandInitialFieldValue
Sitecore.Pipelines.FilterItem
Sitecore.Pipelines.FixXHtml
Sitecore.Pipelines.GetAboutInformation
Sitecore.Pipelines.GetChromeData
Sitecore.Pipelines.GetContentEditorWarnings
Sitecore.Pipelines.GetItemPersonalizationVisibility
Sitecore.Pipelines.GetLookupSourceItems
Sitecore.Pipelines.GetMasters
Sitecore.Pipelines.GetMediaCreatorOptions
Sitecore.Pipelines.GetPageEditorNotifications
Sitecore.Pipelines.GetPageEditorValidators
Sitecore.Pipelines.GetPagePreviewUrl
Sitecore.Pipelines.GetPlaceholderRenderings
Sitecore.Pipelines.GetQueryState
Sitecore.Pipelines.GetRenderingDatasource
Sitecore.Pipelines.GetRenderingPreview
Sitecore.Pipelines.GetSyndicationWarnings
Sitecore.Pipelines.GetTranslation
Sitecore.Pipelines.GetVisitorEmailAddress
Sitecore.Pipelines.HasPresentation
Sitecore.Pipelines.HealthMonitor
Sitecore.Pipelines.HttpRequest
Sitecore.Pipelines.InsertRenderings
Sitecore.Pipelines.InsertRenderings.Processors
Sitecore.Pipelines.Loader
Sitecore.Pipelines.LoadHtml
Sitecore.Pipelines.LoadLayout
Sitecore.Pipelines.LoggedIn
Sitecore.Pipelines.LoggingIn
Sitecore.Pipelines.Login
Sitecore.Pipelines.Logout
Sitecore.Pipelines.ParseDocx
Sitecore.Pipelines.PreprocessRequest
Sitecore.Pipelines.ProcessSimulatorResponse
Sitecore.Pipelines.RenderDocx
Sitecore.Pipelines.RenderField
Sitecore.Pipelines.RenderItemTile
Sitecore.Pipelines.RenderLayout
Sitecore.Pipelines.ResolveRenderingDatasource
Sitecore.Pipelines.Save
Sitecore.Pipelines.SaveHtml
Sitecore.Pipelines.SaveLayout
Sitecore.Pipelines.Search
Sitecore.Pipelines.SessionEnd
Sitecore.Pipelines.SetupEditFrame
Sitecore.Pipelines.Shutdown
Sitecore.Pipelines.Upload
Sitecore.Pipelines.WebDAV
Sitecore.Pipelines.WebDAV.Processors
Sitecore.Platform
Sitecore.Presentation
Sitecore.Properties
Sitecore.Publishing
Sitecore.Publishing.Pipelines.Publish
Sitecore.Publishing.Pipelines.PublishItem
Sitecore.Reflection
Sitecore.Reflection.Emit
Sitecore.Resources
Sitecore.Resources.Media
Sitecore.Resources.Media.Streaming
Sitecore.Resources.Media.Streaming.Preconditions
Sitecore.Rules
Sitecore.Rules.Actions
Sitecore.Rules.ConditionalRenderings
Sitecore.Rules.Conditions
Sitecore.Rules.Conditions.FieldConditions
Sitecore.Rules.Conditions.ItemConditions
Sitecore.Rules.Conditions.PathConditions
Sitecore.Rules.Conditions.SecurityConditions
Sitecore.Rules.Conditions.SiteConditions
Sitecore.Rules.Conditions.SystemConditions
Sitecore.Rules.Conditions.WorkflowConditions
Sitecore.Rules.ContentEditorWarnings
Sitecore.Rules.InsertOptions
Sitecore.Rules.RuleMacros
Sitecore.Rules.Validators
Sitecore.Search
Sitecore.Search.Crawlers
Sitecore.Search.Crawlers.FieldCrawlers
Sitecore.Search.Internal
Sitecore.Security
Sitecore.Security.AccessControl
Sitecore.Security.Accounts
Sitecore.Security.Authentication
Sitecore.Security.Domains
Sitecore.Security.Principal
Sitecore.Security.Serialization
Sitecore.Security.Serialization.ObjectModel
Sitecore.SecurityModel
Sitecore.SecurityModel.Cryptography
Sitecore.SecurityModel.License
Sitecore.Services
Sitecore.Shell
Sitecore.Shell.Applications.ContentEditor
Sitecore.Shell.Applications.ContentEditor.Galleries
Sitecore.Shell.Applications.ContentEditor.Gutters
Sitecore.Shell.Applications.ContentEditor.Publishing
Sitecore.Shell.Applications.ContentEditor.RichTextEditor
Sitecore.Shell.Applications.Dialogs
Sitecore.Shell.Applications.Dialogs.FilterEditor
Sitecore.Shell.Applications.Dialogs.ItemLister
Sitecore.Shell.Applications.Dialogs.MediaBrowser
Sitecore.Shell.Applications.Dialogs.Personalize
Sitecore.Shell.Applications.Dialogs.ProgressBoxes
Sitecore.Shell.Applications.Dialogs.RulesEditor
Sitecore.Shell.Applications.Dialogs.SelectDatabaseRowOptions
Sitecore.Shell.Applications.Dialogs.SortContent
Sitecore.Shell.Applications.Dialogs.Testing
Sitecore.Shell.Applications.WebEdit
Sitecore.Shell.Data
Sitecore.Shell.DeviceSimulation
Sitecore.Shell.Feeds
Sitecore.Shell.Feeds.FeedTypes
Sitecore.Shell.Feeds.Sections
Sitecore.Shell.Framework
Sitecore.Shell.Framework.CommandBuilders
Sitecore.Shell.Framework.Commands
Sitecore.Shell.Framework.Commands.AccessViewer
Sitecore.Shell.Framework.Commands.Archives
Sitecore.Shell.Framework.Commands.BrokenLinks
Sitecore.Shell.Framework.Commands.Carousel
Sitecore.Shell.Framework.Commands.Clipboard
Sitecore.Shell.Framework.Commands.ContentEditor
Sitecore.Shell.Framework.Commands.ContentEditor.ContentImage
Sitecore.Shell.Framework.Commands.ContentEditor.Validators
Sitecore.Shell.Framework.Commands.Databases
Sitecore.Shell.Framework.Commands.DomainManager
Sitecore.Shell.Framework.Commands.Favorites
Sitecore.Shell.Framework.Commands.IDE
Sitecore.Shell.Framework.Commands.Imager
Sitecore.Shell.Framework.Commands.ItemSecurityEditor
Sitecore.Shell.Framework.Commands.Masters
Sitecore.Shell.Framework.Commands.Media
Sitecore.Shell.Framework.Commands.Preferences
Sitecore.Shell.Framework.Commands.Ribbon
Sitecore.Shell.Framework.Commands.RoleManager
Sitecore.Shell.Framework.Commands.SecurityEditor
Sitecore.Shell.Framework.Commands.Serialization
Sitecore.Shell.Framework.Commands.Shell
Sitecore.Shell.Framework.Commands.System
Sitecore.Shell.Framework.Commands.TemplateBuilder
Sitecore.Shell.Framework.Commands.Templates
Sitecore.Shell.Framework.Commands.UserManager
Sitecore.Shell.Framework.Commands.WebDAV
Sitecore.Shell.Framework.Commands.WebEdit
Sitecore.Shell.Framework.Commands.Workbox
Sitecore.Shell.Framework.Jobs
Sitecore.Shell.Framework.Pipelines
Sitecore.Shell.Web
Sitecore.Shell.Web.UI
Sitecore.Shell.Web.UI.WebControls
Sitecore.sitecore.shell.Applications.Floatie
Sitecore.Sites
Sitecore.Sites.Rendering
Sitecore.StringExtensions
Sitecore.Syndication
Sitecore.Syndication.Web
Sitecore.Tasks
Sitecore.Testing
Sitecore.Text
Sitecore.Text.Diff
Sitecore.Text.Diff.View
Sitecore.Text.NVelocity
Sitecore.Threading
Sitecore.Threading.Locks
Sitecore.Utils
Sitecore.Visualization
Sitecore.Web
Sitecore.Web.Authentication
Sitecore.Web.Authentication.DI
Sitecore.Web.Bundling
Sitecore.Web.Configuration
Sitecore.Web.Hosting
Sitecore.Web.IPAddresses
Sitecore.Web.Services
Sitecore.Web.Services.Heartbeat
Sitecore.Web.UI
Sitecore.Web.UI.Framework.Scripts
Sitecore.Web.UI.Grids
Sitecore.Web.UI.HtmlControls
Sitecore.Web.UI.HtmlControls.Controls
Sitecore.Web.UI.HtmlControls.Data
Sitecore.Web.UI.PageModes
Sitecore.Web.UI.Pages
Sitecore.Web.UI.Portal
Sitecore.Web.UI.Sheer
Sitecore.Web.UI.WebControls
Sitecore.Web.UI.WebControls.Presentation
Sitecore.Web.UI.WebControls.Ribbons
Sitecore.Web.UI.XamlSharp
Sitecore.Web.UI.XamlSharp.Ajax
Sitecore.Web.UI.XamlSharp.Continuations
Sitecore.Web.UI.XamlSharp.Renderings
Sitecore.Web.UI.XamlSharp.Xaml
Sitecore.Web.UI.XamlSharp.Xaml.Attributes
Sitecore.Web.UI.XamlSharp.Xaml.ControlCompilers
Sitecore.Web.UI.XamlSharp.Xaml.Converters
Sitecore.Web.UI.XamlSharp.Xaml.Extensions
Sitecore.Web.UI.XmlControls
Sitecore.Web.UI.XslControls
Sitecore.WordOCX
Sitecore.WordOCX.Extensions
Sitecore.WordOCX.HtmlDocument
Sitecore.Workflows
Sitecore.Workflows.Simple
Sitecore.Xml
Sitecore.Xml.Patch
Sitecore.Xml.Serialization
Sitecore.Xml.XPath
Sitecore.Xml.Xsl
Web.UI.XamlSharp.Xaml.Attributes

Sources