コード例 #1
0
ファイル: NodeBuilder.cs プロジェクト: maxpavlov/FlexNet
 public NodeBuilder(NodeToken token)
 {
     _token = token;
     _token.NodeData = null;
     _data = new NodeData(_token.NodeTypeId, _token.ContentListTypeId)
     {
         IsShared = false,
         SharedData = null,
     };
 }
コード例 #2
0
 protected Page(NodeToken nt) : base(nt)
 {
 }
コード例 #3
0
ファイル: DocumentLibrary.cs プロジェクト: vlslavik/SenseNet
 protected DocumentLibrary(NodeToken nt) : base(nt)
 {
 }
コード例 #4
0
 protected CalendarEvent(NodeToken nt) : base(nt)
 {
 }
コード例 #5
0
 public TestNode2(NodeToken token) : base(token)
 {
 }
コード例 #6
0
 protected BlogPost(NodeToken nt) : base(nt)
 {
 }
コード例 #7
0
ファイル: Folder.cs プロジェクト: y1027/sensenet
 /// <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)
 {
 }
コード例 #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)
 {
 }
コード例 #9
0
 protected NotLoadableAspect(NodeToken nt) : base(nt)
 {
     throw new ApplicationException("##Forbidden");
 }
コード例 #10
0
ファイル: ContentList.cs プロジェクト: sztomi/sensenet
 protected ContentList(NodeToken nt) : base(nt)
 {
     Initialize();
 }
コード例 #11
0
 protected Task(NodeToken nt) : base(nt)
 {
 }
コード例 #12
0
 protected MasterPage(NodeToken nt) : base(nt)
 {
 }
コード例 #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)
 {
 }
コード例 #14
0
ファイル: PortalSettings.cs プロジェクト: sztomi/sensenet
 protected PortalSettings(NodeToken nt) : base(nt)
 {
 }
コード例 #15
0
 protected TestNodeWithBinaryProperty(NodeToken token) : base(token)
 {
 }
コード例 #16
0
 protected RepositoryCancelEventHandler(NodeToken nt) : base(nt) { }
コード例 #17
0
 protected TestSystemFolder(NodeToken nt) : base(nt)
 {
 }
コード例 #18
0
 protected SurveyItem(NodeToken nt)
     : base(nt)
 {
 }
コード例 #19
0
 protected RegistrationWorkflow(NodeToken nt) : base(nt)
 {
 }
コード例 #20
0
 protected ForumEntry(NodeToken nt) : base(nt)
 {
 }
コード例 #21
0
ファイル: TrashBag.cs プロジェクト: y1027/sensenet
 /// <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)
 {
 }
コード例 #22
0
 protected Domain(NodeToken token) : base(token)
 {
 }
コード例 #23
0
 protected DynamicJsonContent(NodeToken nt)
     : base(nt)
 {
     BuildFieldMetadata();
 }
コード例 #24
0
ファイル: ContentLink.cs プロジェクト: sztomi/sensenet
 protected ContentLink(NodeToken tk) : base(tk)
 {
 }
コード例 #25
0
 protected SmartFolder(NodeToken nt) : base(nt)
 {
 }
コード例 #26
0
ファイル: ODataTestBase.cs プロジェクト: pianomanx/sensenet
 protected OData_ReferenceTest_ContentHandler(NodeToken token) : base(token)
 {
 }
コード例 #27
0
 protected PageTemplate(NodeToken nt) : base(nt)
 {
 }
コード例 #28
0
ファイル: ODataTestBase.cs プロジェクト: pianomanx/sensenet
 protected OData_Filter_ThroughReference_ContentHandler(NodeToken token) : base(token)
 {
 }
コード例 #29
0
ファイル: Site.cs プロジェクト: lrcchuan2016/sensenet
 /// <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)
 {
 }
コード例 #30
0
ファイル: ExpenseClaim.cs プロジェクト: vlslavik/SenseNet
 protected ExpenseClaim(NodeToken nt) : base(nt)
 {
 }
コード例 #31
0
 protected ContentLinkPlus(NodeToken nt) : base(nt)
 {
 }
コード例 #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)
 {
 }
コード例 #33
0
 protected RepositoryEventHandlerBase(NodeToken nt) : base(nt) { }
コード例 #34
0
ファイル: NodeType.cs プロジェクト: maxpavlov/FlexNet
		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;
                
		}