Пример #1
0
        private bool AddIsolatedComReferences(ApplicationManifest manifest)
        {
            int  t1      = Environment.TickCount;
            bool success = true;

            if (IsolatedComReferences != null)
            {
                foreach (ITaskItem item in IsolatedComReferences)
                {
                    string name = item.GetMetadata("Name");
                    if (String.IsNullOrEmpty(name))
                    {
                        name = Path.GetFileName(item.ItemSpec);
                    }
                    FileReference file = AddFileFromItem(item);
                    if (!file.ImportComComponent(item.ItemSpec, manifest.OutputMessages, name))
                    {
                        success = false;
                    }
                }
            }

            Util.WriteLog(String.Format(CultureInfo.CurrentCulture, "GenerateApplicationManifest.AddIsolatedComReferences t={0}", Environment.TickCount - t1));
            return(success);
        }