コード例 #1
0
        void Load()
        {
            byte[]        bytesOut;
            Assembly      ass = LibraryObjectWrapper.Load(bytes, out bytesOut);
            IArrowFactory f   = GetFactory(ass);

            theArrow = f[name];
            ICategoryArrow arr = this;

            theArrow.SetAssociatedObject(arr.Object);
        }
コード例 #2
0
        /// <summary>
        /// Adds dynamic link library
        /// </summary>
        /// <param name="filename">Library file</param>
        public void Add(string filename)
        {
            Stream stream = File.OpenRead(filename);

            byte[] b = new byte[stream.Length];
            stream.Read(b, 0, b.Length);
            stream.Close();
            byte[] bytesOut;
            assembly = LibraryObjectWrapper.Load(b, out bytesOut);
            bytes.Add(b);
            names.Add(filename);
        }
コード例 #3
0
        /// <summary>
        /// Initialization
        /// </summary>
        protected void init()
        {
            byte[]        bytesOut = null;
            int           i        = 0;
            List <byte[]> lb       = new List <byte[]>(bytes);

            foreach (byte[] b in lb)
            {
                assembly = LibraryObjectWrapper.Load(b, out bytesOut);
                if (bytesOut != null)
                {
                    bytes[i] = bytesOut;
                }
                ++i;
            }
            IObjectFactory factory = Factory;

            theObject   = factory[name];
            childern[0] = theObject;
            IPropertiesEditor pe = theObject.GetObject <IPropertiesEditor>();

            if ((properties != null) & (pe != null))
            {
                pe.Properties = properties;
            }
            if (bytesOut != null)
            {
                Interfaces.ISeparatedAssemblyEditedObject
                    ine = theObject.GetObject <Interfaces.ISeparatedAssemblyEditedObject>();
                if (ine != null)
                {
                    ine.FirstLoad();
                }
            }
            if (Object != null)
            {
                theObject.SetAssociatedObject(Object);
            }
        }