Attributes

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Zviki Goldberg

    #1

    Attributes

    Hi All...

    I have a Auditing system. I want to send Audit messages using attributes. I
    managed to activate the ContextAttribut e object, BUT it forced me to inherit
    from ContextBound object (which is too much for me, cause I want to use this
    attribute auditing also in web pages).
    Is there any option to do so ?
    Maybe the solution is somewhere in the Demand staff (.NET rle base
    security).... How is that check enabled ??

    Thanks a lot,...

    Zviki.


  • Natty Gur

    #2
    Re: Attributes

    Hi,

    You can create your own Attribute and to use it in the code.

    Natty Gur, CTO
    Dao2Com Ltd.
    34th Elkalay st. Raanana
    Israel , 43000
    Phone Numbers:
    Office: +972-(0)9-7740261
    Fax: +972-(0)9-7740261
    Mobile: +972-(0)58-888377


    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!

    Comment

    • Zviki Goldberg

      #3
      Re: Attributes

      Hi and thanks for your quick answer...

      If I inherit from attribute it means that I must add some line of code
      inside the function and not only in the header of the function. My goal is
      to put the attribute in the head of a function, class and I can do Auditing
      (for ex).

      I would appreciate if you would send me some line of code..

      Thanks a lot...

      Zviki

      "Natty Gur" <natty@dao2com. com> wrote in message
      news:#YNLV2cWDH A.2360@TK2MSFTN GP12.phx.gbl...[color=blue]
      > Hi,
      >
      > You can create your own Attribute and to use it in the code.
      >
      > Natty Gur, CTO
      > Dao2Com Ltd.
      > 34th Elkalay st. Raanana
      > Israel , 43000
      > Phone Numbers:
      > Office: +972-(0)9-7740261
      > Fax: +972-(0)9-7740261
      > Mobile: +972-(0)58-888377
      >
      >
      > *** Sent via Developersdex http://www.developersdex.com ***
      > Don't just participate in USENET...get rewarded for it![/color]


      Comment

      • Natty Gur

        #4
        Re: Attributes

        The all idea of attribute is that instead of writing code you uswe just
        the Attribute decleration. the code need to be write in the attribute
        costructor or in other class that use reflection in order to find
        attributes and do the work.

        [Audit()]
        Public void MyFunc()
        {
        // function body
        }

        refer to :



        Natty Gur, CTO
        Dao2Com Ltd.
        34th Elkalay st. Raanana
        Israel , 43000
        Phone Numbers:
        Office: +972-(0)9-7740261
        Fax: +972-(0)9-7740261
        Mobile: +972-(0)58-888377


        *** Sent via Developersdex http://www.developersdex.com ***
        Don't just participate in USENET...get rewarded for it!

        Comment

        Working...