Details

    • Type: Defect
    • Status: Resolved
    • Priority: Minor
    • Resolution: Complete
    • Affects Version/s: 1.3.2, 2.0 M1
    • Fix Version/s: 2.0 RC1
    • Component/s: None
    • Labels:

      Description

      section "5.4.2. The prototype scope" the documentation says to use the following example to make a prototype scoped object:

      <object id="exampleObject" type="Examples.ExampleObject, ExamplesLibrary" scope="prototype"/>
      

      Also documentation note:

      The scope element is the preferred element to use.

      But the xsd file allow you only put application, session, request.

              <!--
                   Optional attribute controlling the scope of singleton instances. It is
                   only applicable to ASP.Net web applications and it has no effect on prototype
                   objects. Applications other than ASP.Net web applications simply ignore this attribute.
                   It has 3 possible values:
                   1. "application"
                   Default object scope. Objects defined with application scope will behave like
                   traditional singleton objects. Same instance will be returned from every call
                   to IApplicationContext.GetObject()
                   
                   2. "session"
                   Objects with this scope will be stored within user's HTTP session. Session scope
                   is typically used for objects such as shopping cart, user profile, etc.
                   
                   3. "request"
                   Object with this scope will be initialized for each HTTP request, but unlike with prototype
                   objects, same instance will be returned from all calls to IApplicationContext.GetObject()
                   within the same HTTP request. For example, if one ASP page forwards request to another using
                   Server.Transfer method, they can easily share the state by configuring dependency to the same
                   request-scoped object.
              -->
              <xsd:attribute name="scope" use="optional" default="application">
                  <xsd:simpleType>
                      <xsd:restriction base="xsd:string">
                          <xsd:enumeration value="application"/>
                          <xsd:enumeration value="session"/>
                          <xsd:enumeration value="request"/>
                      </xsd:restriction>
                  </xsd:simpleType>
              </xsd:attribute>
      

        Attachments

          Activity

            People

            • Assignee:
              lahma Marko Lahma
              Reporter:
              rmqkr rmqkr
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: