public NodeBuilder(NodeToken token) { _token = token; _token.NodeData = null; _data = new NodeData(_token.NodeTypeId, _token.ContentListTypeId) { IsShared = false, SharedData = null, }; }
protected Page(NodeToken nt) : base(nt) { }
protected DocumentLibrary(NodeToken nt) : base(nt) { }
protected CalendarEvent(NodeToken nt) : base(nt) { }
public TestNode2(NodeToken token) : base(token) { }
protected BlogPost(NodeToken nt) : base(nt) { }
/// <summary> /// Initializes a new instance of the <see cref="Folder"/> class in the loading procedure. /// Do not use this constructor directly from your code. /// </summary> protected Folder(NodeToken nt) : base(nt) { }
/// <summary> /// Initializes a new instance of the <see cref="Workspace"/> class during the loading process. /// Do not use this constructor directly in your code. /// </summary> protected Workspace(NodeToken nt) : base(nt) { }
protected NotLoadableAspect(NodeToken nt) : base(nt) { throw new ApplicationException("##Forbidden"); }
protected ContentList(NodeToken nt) : base(nt) { Initialize(); }
protected Task(NodeToken nt) : base(nt) { }
protected MasterPage(NodeToken nt) : base(nt) { }
/// <summary> /// Initializes a new instance of the <see cref="Settings"/> class during the loading process. /// Do not use this constructor directly in your code. /// </summary> protected Settings(NodeToken nt) : base(nt) { }
protected PortalSettings(NodeToken nt) : base(nt) { }
protected TestNodeWithBinaryProperty(NodeToken token) : base(token) { }
protected RepositoryCancelEventHandler(NodeToken nt) : base(nt) { }
protected TestSystemFolder(NodeToken nt) : base(nt) { }
protected SurveyItem(NodeToken nt) : base(nt) { }
protected RegistrationWorkflow(NodeToken nt) : base(nt) { }
protected ForumEntry(NodeToken nt) : base(nt) { }
/// <summary> /// Initializes a new instance of the <see cref="TrashBag"/> class during the loading process. /// Do not use this constructor directly from your code. /// </summary> protected TrashBag(NodeToken tk) : base(tk) { }
protected Domain(NodeToken token) : base(token) { }
protected DynamicJsonContent(NodeToken nt) : base(nt) { BuildFieldMetadata(); }
protected ContentLink(NodeToken tk) : base(tk) { }
protected SmartFolder(NodeToken nt) : base(nt) { }
protected OData_ReferenceTest_ContentHandler(NodeToken token) : base(token) { }
protected PageTemplate(NodeToken nt) : base(nt) { }
protected OData_Filter_ThroughReference_ContentHandler(NodeToken token) : base(token) { }
/// <summary> /// Initializes a new instance of the <see cref="Site"/> class during the loading process. /// Do not use this constructor directly in your code. /// </summary> protected Site(NodeToken nt) : base(nt) { }
protected ExpenseClaim(NodeToken nt) : base(nt) { }
protected ContentLinkPlus(NodeToken nt) : base(nt) { }
/// <summary> /// Initializes a new instance of the <see cref="Aspect"/> class in the loading procedure. /// Do not use this constructor directly from your code. /// </summary> protected Aspect(NodeToken nt) : base(nt) { }
protected RepositoryEventHandlerBase(NodeToken nt) : base(nt) { }
internal Node CreateInstance(NodeToken token) { if (_type == null) _type = TypeHandler.GetType(_className); if (_type == null) { string exceptionMessage = string.Format(CultureInfo.InvariantCulture, "Type not found, therefore the node can't be created.\nClass name: {0}\nNode type path: {1}\nParent class name: {2}\n", _className, _nodeTypePath, (_parent != null ? _parent._className : "Parent type is null")); if (token != null) exceptionMessage = string.Concat(exceptionMessage, string.Format(CultureInfo.InvariantCulture, "Token.NodeId: {0}\nToken.Path: {1}", token.NodeId, (token.NodeData != null ? token.NodeData.Path : "UNKNOWN (InnerInfo is not loaded)"))); else exceptionMessage = string.Concat(exceptionMessage, "The given token is null."); throw new ApplicationException(exceptionMessage); } ConstructorInfo ctor = _type.GetConstructor(BindingFlags.NonPublic | BindingFlags.Instance, null, _loadArgTypes, null); if(ctor == null) //---- only protected ctor is valid throw new TypeInitializationException(token.NodeType.ClassName, null); Node node; try { node = (Node)ctor.Invoke(new object[] { token }); } catch (Exception ex) //rethrow { if (token.NodeData != null) throw new ApplicationException(string.Format(CultureInfo.InvariantCulture, "Couldn't create an instance of type \"{0}\" (Path: {4}, NodeId: {1}). The invoked constructor threw an exception of type {2} (it said \"{3}\")." , this.Name, token.NodeId, ex.GetType().Name, ex.Message, token.NodeData.Path), ex); else throw new ApplicationException(string.Format(CultureInfo.InvariantCulture, "Couldn't create an instance of type \"{0}\" (NodeId: {1}). The invoked constructor threw an exception of type {2} (it said \"{3}\")." , this.Name, token.NodeId, ex.GetType().Name, ex.Message), ex); } return node; }