static public new ComponentBase Create(iCalObject parent, string name) { switch (name) { case EVENT: return(new CustomEvent1(parent)); default: return(ComponentBase.Create(parent, name)); } }
static public new ComponentBase Create(iCalObject parent, string name) { switch (name) { case "VEVENT": // For event objects, use our custom event class return new CustomEvent(parent); default: // Otherwise, use the default classes return ComponentBase.Create(parent, name); } }
static public ComponentBase Create(iCalObject parent, string name) { switch (name.ToUpper()) { case EVENT: // For event objects, use our custom event class return(new CustomEvent(parent)); default: // Otherwise, use the default classes return(ComponentBase.Create(parent, name)); } }
public void x_comp( iCalObject o ) //throws RecognitionException, TokenStreamException { IToken n = null; ComponentBase c; try { // for error handling match(BEGIN); match(COLON); n = LT(1); match(X_NAME); c = ComponentBase.Create(o, n.getText()); match(CRLF); { // ( ... )+ int _cnt13 = 0; for (;;) { if ((LA(1) == BEGIN || LA(1) == IANA_TOKEN || LA(1) == X_NAME)) { calendarline(c); } else { if (_cnt13 >= 1) { goto _loop13_breakloop; } else { throw new NoViableAltException(LT(1), getFilename());; } } _cnt13++; } _loop13_breakloop :; } // ( ... )+ match(END); match(COLON); match(X_NAME); match(CRLF); c.OnLoad(EventArgs.Empty); } catch (RecognitionException ex) { reportError(ex); recover(ex, tokenSet_4_); } }