コード例 #1
0
ファイル: Plug.cs プロジェクト: BackupTheBerlios/proteus-svn
        protected Plug(string _name, string _description, string _documentation, bool _isMultiplex, IActor actor)
        {
            DocumentationAttribute docAttribute  = new DocumentationAttribute(_description, _documentation);
            PlugAttribute          plugAttribute = new PlugAttribute(_name);

            Initialize(docAttribute, plugAttribute, _isMultiplex, actor);
        }
コード例 #2
0
ファイル: Plug.cs プロジェクト: BackupTheBerlios/proteus-svn
        protected Plug(Type type, bool _isMultiplex, IActor actor)
        {
            name = type.Name;

            DocumentationAttribute _documentation = Attribute.GetCustomAttribute(type, typeof(DocumentationAttribute)) as DocumentationAttribute;
            PlugAttribute          _plug          = Attribute.GetCustomAttribute(type, typeof(PlugAttribute)) as PlugAttribute;

            Initialize(_documentation, _plug, _isMultiplex, actor);
        }
コード例 #3
0
ファイル: Plug.cs プロジェクト: BackupTheBerlios/proteus-svn
        protected Plug(MemberInfo info, bool _isMultiplex, IActor actor)
        {
            // Store the name
            name = info.Name;

            DocumentationAttribute _documentation = Attribute.GetCustomAttribute(info, typeof(DocumentationAttribute)) as DocumentationAttribute;
            PlugAttribute          _plug          = Attribute.GetCustomAttribute(info, typeof(PlugAttribute)) as PlugAttribute;

            Initialize(_documentation, _plug, _isMultiplex, actor);
        }
コード例 #4
0
ファイル: Plug.cs プロジェクト: BackupTheBerlios/proteus-svn
        private void Initialize(DocumentationAttribute _documentation,
                                PlugAttribute _plug,
                                bool _isMultiplex,
                                IActor actor)
        {
            owner       = actor;
            isMultiplex = _isMultiplex;

            if (_plug != null)
            {
                if (_plug.Name != string.Empty)
                {
                    name = _plug.Name;
                }
            }

            // Store the documentation.
            documentationAttribute = _documentation;

            if (documentationAttribute == null)
            {
                documentationAttribute = new DocumentationAttribute();
            }
        }