[IsModule] attribute | The OWIN Framework Pages
The [IsModule] Attribute
Attach this attribute to a class to identify it as a module.
internal class ContentModule
internal class DefaultStylesComponent
The [IsModule()] attribute has the following
properties you can set.
You will want to choose a unique name for your module to make it useful.
This defines the asset deployment mechanism to use for all elements assigned
to this module.
The possible values for the AssetDeployment property are:
Inherit means that page element will interit
the AssetDeployment property of the containing page
element. If all elements on a page are set to Inherit
(which is the default) then they all follow the asset deployment mechanism set
in the page. Pages default to PerWebsite, so by default
InPage means that page element will write its
of the page. This option is mainly useful for debugging and generating html for
CSS asset that is specific to that page and contains everything that that page
needs to render. If the same page element is used on multiple pages then its
pages where it is referenced. This option means that the page will only reference
exactly what it needs, but the browser will have to fetch the assets associated
with every page that the user visits.
PerModule means that the element should use the
AssetDeployment property of the module it is in.
You can also specify this module by name with the [DeployedAs]
and CSS asset for the entire website and this element will write its CSS and