[CLOSED] ExtNet vs X - ReSharper warning of access to a static member of a type via a derived type

  1. #1

    [CLOSED] ExtNet vs X - ReSharper warning of access to a static member of a type via a derived type

    I keep forgetting to ask about this:

    Throughout your examples you use X instead of ExtNet (e.g. X.IsAjaxRequest() etc), which is nice.

    At work we use ReSharper. One of the things it warns about is the use of X to access static members that come from its parent class. This is the page it gives as the reason it considers this a warning:

    Although in ReSharper it is easy to turn this warning off, as part of coding conventions/standards for our company we have opted to keep it on.

    I know you can also individually ignore particular things ReSharper suggests, but on UI code that would end up with ReSharper ignore comments littered throughout the code making it hard to read (thus defeating one of the purposes of X I suppose).

    I know this is not really your problem; it works. But, I was just looking at the Ext.NET code for the X class. I was wondering - do you need both classes? Couldn't ExtNET just become X? I may have missed something.

    Anyway, at the moment low priority for me; just curious!

    Last edited by Daniil; Oct 02, 2012 at 6:38 PM. Reason: [CLOSED]
  2. #2
    My preference would be to remove "ExtNet".

    When the "X" alias was first implemented, we received some feedback (pushback really) to the idea/concept. We implemented "ExtNet" as another alternative.

    I've never used "ExtNet", we never use "ExtNet" in any of the samples, and it rarely (if ever) does the topic come up in the forums.

    I vote to remove in v2.1.
    Last edited by geoffrey.mcgill; Sep 29, 2012 at 12:29 AM.
    Geoffrey McGill
    Founder & CEO
  3. #3
    Hi Geoffrey and Anup,

    Some note.

    Typing X in VB gives the list of builders, because it is considered as X() in VB, i.e. our extension method:
    public static BuilderFactory X(this Page self)
        return Ext.Net.X.Builder;
    Actually, I often see ExtNet in the VB examples of the forums.

    Though, I don't think it is a problem, just we will have to add a breaking change item like:

    The ExtNET class has been removed. Please use the Ext.Net.X class.

    Note for the VB developers.

    Please use the full Ext.Net.X name instead of just X, because VB will interpret "X" as the extension method X() which returns the list of builders.
  4. #4

    Just wanted to follow up whether this will definitely be removed in 2.1 or maybe later - just in case I need to update the book somewhere (don't think I will need to, but just in case...)

  5. #5
    I switched the two classes. Now ExtNet inherits from X.

    Hopefully this should solve the ReSharper warning and not cause any breaking changes.

    When you have a chance, please re-test your project and let us know if this is an acceptable solution.
    Geoffrey McGill
    Founder & CEO
  6. #6
    We are marking the thread closed.

    If you will have any update, please feel free to post.
  7. #7
    Sorry for not getting round to this sooner. Had a quick look at latest code. Looks great. Many thanks.
  8. #8
    No problem! Thank you for the feedback!

Similar Threads

  1. Combobox type Ahead
    By blurken in forum 2.x Help
    Replies: 0
    Last Post: May 14, 2012, 1:47 AM
  2. The type or namespace name 'Ext' could not be found
    By andrefreitasjr in forum 1.x Help
    Replies: 1
    Last Post: Feb 28, 2012, 1:03 PM
  3. Change input type based on data type
    By bjones in forum 1.x Help
    Replies: 5
    Last Post: Jan 06, 2012, 9:54 AM
  4. Postback when type enter
    By Martyrian in forum 1.x Help
    Replies: 0
    Last Post: Oct 08, 2009, 12:11 PM
  5. what type of code is thos
    By joydeepsen in forum 1.x Help
    Replies: 0
    Last Post: Jun 06, 2009, 8:03 AM

Posting Permissions