Esempio n. 1
0
 /// <summary>
 ///     Constructor
 /// </summary>
 /// <param name="part">HttpParts</param>
 public HttpPartAttribute(HttpParts part)
 {
     Part = part;
 }
		/// <summary>
		///     Constructor
		/// </summary>
		/// <param name="part">HttpParts</param>
		public HttpPartAttribute(HttpParts part)
		{
			Part = part;
		}
Esempio n. 3
0
 /// <summary>
 ///     Find the PropertyInfo for the matching property
 /// </summary>
 /// <param name="properties">Ienumerable with PropertyInfo</param>
 /// <param name="part">HttpParts specifying which property to find</param>
 /// <param name="propertyInfo">PropertyInfo out parameter</param>
 /// <returns>bool if found</returns>
 private static bool TryFindTarget(this IEnumerable <PropertyInfo> properties, HttpParts part, out PropertyInfo propertyInfo)
 {
     propertyInfo = properties.FirstOrDefault(t => t.GetCustomAttribute <HttpPartAttribute>().Part == part);
     return(propertyInfo != null);
 }