Beispiel #1
0
		/// <summary>
		/// Internal copy ctor.
		/// </summary>
		public SMethod( SMethod method )
			: base( method )
		{
			IsAvailable = method.IsAvailable;
		}
Beispiel #2
0
		/// <summary>
		/// Gets information about specified method.
		/// </summary>
		public SMethod GetMethod( string methName )
		{
			if( !m_Class.Methods.Contains( methName ) )
				throw new NoMemberInformationException( methName );

			SMethod method = new SMethod( m_Class.Methods[ methName ] );

			if( !String.IsNullOrEmpty( m_StateName ) ) {
				XmlNode methodNode = m_Class.StatesMap[ m_StateMask ].SelectSingleNode(
					@"ws:methods/ws:method[@ws:name='" + methName + "']", MetaData.Instance.XMLNsMgr );

				if( methodNode != null ) {
					XmlNode node;

					// caption
					string cap = Tools.GetLocalizedString( methodNode, "caption" );
					if( cap != null )
						method.Caption = cap;

					// description
					string descr = Tools.GetLocalizedString( methodNode, "description" );
					if( descr != null )
						method.Description = descr;

					// display position
					node = methodNode.SelectSingleNode( "ws:displayOrder",
						MetaData.Instance.XMLNsMgr );
					if( node != null )
						method.DisplayOrder = int.Parse( node.InnerText );

					// availability flag
					node = methodNode.SelectSingleNode( "ws:isAvailable",
						MetaData.Instance.XMLNsMgr );
					if( node != null )
						method.IsAvailable = bool.Parse( node.InnerText );
				}
			}

			return method;
		}