Exemple #1
0
        /// <summary>
        /// Returns a value indicating whether the a property named <paramref name="propertyName"/>
        /// exposed by the <see cref="Type"/> specified by <paramref name="typeName"/>
        /// from the reference project is also visible to the dependent project.
        /// </summary>
        /// <param name="typeName">The full name of the <see cref="Type"/> from the reference project.</param>
        /// <param name="propertyName">The name of the property.</param>
        /// <returns>The <see cref="CodeMemberShareKind"/> representing whether it is shared and in what way.</returns>
        public CodeMemberShareKind GetPropertyShareKind(string typeName, string propertyName)
        {
            CodeMemberKey         key         = CodeMemberKey.CreatePropertyKey(typeName, propertyName);
            SharedCodeDescription description = this.GetSharedCodeDescription(key);

            return(description.ShareKind);
        }
 /// <summary>
 /// Creates a new instance of the <see cref="CodeMemberKey"/> class that describes
 /// a property.
 /// </summary>
 /// <param name="propertyInfo">The <see cref="PropertyInfo"/> of that property.</param>
 /// <returns>A new instance which describes that property.</returns>
 public static CodeMemberKey CreatePropertyKey(PropertyInfo propertyInfo)
 {
     Debug.Assert(propertyInfo != null, "propertyInfo cannot be null");
     return(CodeMemberKey.CreatePropertyKey(propertyInfo.DeclaringType.AssemblyQualifiedName, propertyInfo.Name));
 }