TESVSnip.Domain.Model.Plugin.UpdateReferences C# (CSharp) Method

UpdateReferences() public method

Rules: order
public UpdateReferences ( IList plugins ) : void
plugins IList ///
return void
        public void UpdateReferences(IList<Plugin> plugins)
        {
            var masters = this.GetMasters();
            this.Masters = new Plugin[masters.Length + 1];
            this.Fixups = new uint[masters.Length + 1];
            for (int i = 0; i < masters.Length; ++i)
            {
                var master = plugins.FirstOrDefault(x => string.Compare(masters[i], x.Name, true) == 0);
                this.Masters[i] = master;
                this.Fixups[i] = (uint)((master != null) ? master.GetMasters().Length : 0);
            }

            this.Masters[masters.Length] = this;
            this.Fixups[masters.Length] = (uint)masters.Length;
            this.InvalidateCache();
        }