Beispiel #1
0
 public NodeBuilder(NodeToken token)
 {
     _token = token;
     _token.NodeData = null;
     _data = new NodeData(_token.NodeTypeId, _token.ContentListTypeId)
     {
         IsShared = false,
         SharedData = null,
     };
 }
Beispiel #2
0
 protected Page(NodeToken nt) : base(nt)
 {
 }
Beispiel #3
0
 protected DocumentLibrary(NodeToken nt) : base(nt)
 {
 }
Beispiel #4
0
 protected CalendarEvent(NodeToken nt) : base(nt)
 {
 }
Beispiel #5
0
 public TestNode2(NodeToken token) : base(token)
 {
 }
 protected BlogPost(NodeToken nt) : base(nt)
 {
 }
Beispiel #7
0
 /// <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)
 {
 }
Beispiel #8
0
 /// <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)
 {
 }
Beispiel #9
0
 protected NotLoadableAspect(NodeToken nt) : base(nt)
 {
     throw new ApplicationException("##Forbidden");
 }
Beispiel #10
0
 protected ContentList(NodeToken nt) : base(nt)
 {
     Initialize();
 }
Beispiel #11
0
 protected Task(NodeToken nt) : base(nt)
 {
 }
Beispiel #12
0
 protected MasterPage(NodeToken nt) : base(nt)
 {
 }
Beispiel #13
0
 /// <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)
 {
 }
Beispiel #14
0
 protected PortalSettings(NodeToken nt) : base(nt)
 {
 }
Beispiel #15
0
 protected TestNodeWithBinaryProperty(NodeToken token) : base(token)
 {
 }
 protected RepositoryCancelEventHandler(NodeToken nt) : base(nt) { }
 protected TestSystemFolder(NodeToken nt) : base(nt)
 {
 }
Beispiel #18
0
 protected SurveyItem(NodeToken nt)
     : base(nt)
 {
 }
Beispiel #19
0
 protected RegistrationWorkflow(NodeToken nt) : base(nt)
 {
 }
 protected ForumEntry(NodeToken nt) : base(nt)
 {
 }
Beispiel #21
0
 /// <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)
 {
 }
Beispiel #22
0
 protected Domain(NodeToken token) : base(token)
 {
 }
Beispiel #23
0
 protected DynamicJsonContent(NodeToken nt)
     : base(nt)
 {
     BuildFieldMetadata();
 }
Beispiel #24
0
 protected ContentLink(NodeToken tk) : base(tk)
 {
 }
Beispiel #25
0
 protected SmartFolder(NodeToken nt) : base(nt)
 {
 }
Beispiel #26
0
 protected OData_ReferenceTest_ContentHandler(NodeToken token) : base(token)
 {
 }
Beispiel #27
0
 protected PageTemplate(NodeToken nt) : base(nt)
 {
 }
Beispiel #28
0
 protected OData_Filter_ThroughReference_ContentHandler(NodeToken token) : base(token)
 {
 }
Beispiel #29
0
 /// <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)
 {
 }
Beispiel #30
0
 protected ExpenseClaim(NodeToken nt) : base(nt)
 {
 }
Beispiel #31
0
 protected ContentLinkPlus(NodeToken nt) : base(nt)
 {
 }
Beispiel #32
0
 /// <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) { }
Beispiel #34
0
		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;
                
		}