files build execution order

Posted by Mahesh on Stack Overflow See other posts from Stack Overflow or by Mahesh
Published on 2010-04-13T18:39:52Z Indexed on 2010/04/13 18:43 UTC
Read the original article Hit count: 450

Filed under:
|
|

Hi,

I have a data structure which is as given below:


 class File
    {
        public string Value { get; set; }
        public File[] Dependencies { get; set; }
        public bool Change { get; private set; }

    public File(string value,File[] dependencies)
    {
        Value = value;
        Dependencies = dependencies;
        Change = false;
    }
}

Basically, this data structure follows a typical build execution of files.

Each File has a value and a list of dependencies which is again of type File. Every file is exposed with a property called Change which tells whether the file is changed or not.

I brainstormed to form a algorithm which goes through all these files and build in an order( i.e typical build process ) but haven't got a better algorithm.

Can anyone throw some light on this?

Thanks a lot.

Mahesh

© Stack Overflow or respective owner

Related posts about build

Related posts about files