コード例 #1
0
ファイル: ValueModel.cs プロジェクト: TovarishN/Nitra-TDL
        public ValueModel(SourceSnapshot source, ParsedValue <string> value)
        {
            var location = new Location(source, value.Span);

            Value    = value.ValueOrDefault;
            Type     = TypesOfValue.Path; // FIXME: Дичь какая-то. Зачем это?
            Comments = new CommentBlockModel(location);
        }
コード例 #2
0
        public object Clone()
        {
            var clone = new CommentBlockModel(Location);

            clone.Comments.AddRange(Comments);

            return(clone);
        }
コード例 #3
0
ファイル: Model.cs プロジェクト: TovarishN/Nitra-TDL
        protected Model(
            ModelType modelType,
            int id,
            Nitra.Location?location,
            [NotNull] string name,
            [NotNull] string path)
        {
            ModelType = modelType;
            Id        = id;
            Comments  = new CommentBlockModel(location);
            Name      = name;
            FilePath  = path;

            CreateBackReferenceObjects();
        }
コード例 #4
0
ファイル: ValueModel.cs プロジェクト: TovarishN/Nitra-TDL
 public ValueModel([CanBeNull] object value, TypesOfValue type, Location location)
 {
     Value    = value;
     Type     = type;
     Comments = new CommentBlockModel(location);
 }
コード例 #5
0
 public ReferenceModel([NotNull] TRefereedModel referred)
 {
     _modelId = referred.Id;
     Model    = referred;
     Comments = new CommentBlockModel();
 }
コード例 #6
0
 // deferred initialization
 // ReSharper disable once NotNullMemberIsNotInitialized
 public ReferenceModel(int id, Location referenceLocation)
 {
     _modelId = id;
     Comments = new CommentBlockModel(referenceLocation);
 }
コード例 #7
0
 // deferred initialization
 // ReSharper disable once NotNullMemberIsNotInitialized
 public ReferenceModel(int id)
 {
     _modelId = id;
     Comments = new CommentBlockModel();
 }