當前位置: 首頁>>代碼示例>>C#>>正文


C# AttributeList類代碼示例

本文整理匯總了C#中AttributeList的典型用法代碼示例。如果您正苦於以下問題:C# AttributeList類的具體用法?C# AttributeList怎麽用?C# AttributeList使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


AttributeList類屬於命名空間,在下文中一共展示了AttributeList類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: SVGPaintable

    public SVGPaintable(SVGPaintable inheritPaintable, AttributeList attrList)
    {
        this._linearGradList = inheritPaintable.linearGradList;
        this._radialGradList = inheritPaintable.radialGradList;;
        Initialize(attrList);

        if(IsFillX() == false) {
          if(inheritPaintable.IsLinearGradiantFill()) {
        this._gradientID = inheritPaintable.gradientID;
          } else if(inheritPaintable.IsRadialGradiantFill()) {
        this._gradientID = inheritPaintable.gradientID;
          } else this._fillColor = inheritPaintable.fillColor;
        }
        if(!IsStroke()&& inheritPaintable.IsStroke()) {
          this._strokeColor = inheritPaintable.strokeColor;
        }

        if(_strokeLineCap == SVGStrokeLineCapMethod.Unknown) {
          _strokeLineCap = inheritPaintable.strokeLineCap;
        }

        if(_strokeLineJoin == SVGStrokeLineJoinMethod.Unknown) {
          _strokeLineJoin = inheritPaintable.strokeLineJoin;
        }

        if(isStrokeWidth == false)
          this._strokeWidth.NewValueSpecifiedUnits(inheritPaintable.strokeWidth);
    }
開發者ID:pjezek,項目名稱:UnitySVG,代碼行數:28,代碼來源:SVGPaintable.cs

示例2: AttributeList

 public AttributeList(AttributeList a)
 {
     if(a.attrs != null)
       attrs = new Dictionary<string,string>(a.attrs);
     else
       attrs = null;
 }
開發者ID:nanuinteractive,項目名稱:UnitySVG,代碼行數:7,代碼來源:AttributeList.cs

示例3: GetCustomAttributes

    public static AttributeList GetCustomAttributes( Member member, TypeNode attrType ) {
      AttributeList result = null;
      if (member == null) 
	      return null;
      AttributeList attrs = member.Attributes;
      if( attrs != null ) {
        for( int i = 0; i < attrs.Count; i++ ) {
          AttributeNode an = attrs[i];
          if (an == null) continue;
          MemberBinding mb = an.Constructor as MemberBinding;
          if( mb != null && mb.BoundMember != null && mb.BoundMember.DeclaringType == attrType ) {
            if( result == null ) {
              result = new AttributeList();
            }
            result.Add(an);
          }
        }
      }
      if (result == null) {
        TypeNode tn = member as TypeNode;
        if (tn != null) return MetadataHelper.GetCustomAttributes(tn.BaseType, attrType);
        Property p = MetadataHelper.GetPropertyForMethod(member);
        if (p != null) return MetadataHelper.GetCustomAttributes(p, attrType);
      }      
      return result;
    }    
開發者ID:hesam,項目名稱:SketchSharp,代碼行數:26,代碼來源:TypeSystem.cs

示例4: AddRequest

 public AddRequest(
     LDAPDN entry,
     AttributeList attributes)
 {
     this.entry = entry;
     this.attributes = attributes;
 }
開發者ID:yazeng,項目名稱:WindowsProtocolTestSuites,代碼行數:7,代碼來源:AddRequest.cs

示例5: AttributeListAttribute

 internal AttributeListAttribute(INtfsContext context, AttributeRecord record)
     : base(context, record)
 {
     byte[] content = Utilities.ReadAll(Content);
     _list = new AttributeList();
     _list.ReadFrom(content, 0);
 }
開發者ID:alexcmd,項目名稱:DiscUtils,代碼行數:7,代碼來源:AttributeListAttribute.cs

示例6: GetClosestMatch

 public virtual AttributeNode GetClosestMatch(AttributeNode/*!*/ nd1, AttributeList/*!*/ list1, AttributeList list2, int list1pos, ref int list2start,
   TrivialHashtable/*!*/ matchedNodes, out Differences closestDifferences, out int list2pos) {
   closestDifferences = null; list2pos = -1;
   if (list2 == null) return null;
   if (nd1 == null || list1 == null || matchedNodes == null ||  list1pos < 0 || list1pos >= list1.Count || list2start < 0 || list2start >= list2.Count) {
     Debug.Assert(false); return null;
   }
   AttributeNode closest = null;
   Differences winnerSoFar = null;
   for (int j = list2start, m = list2.Count; j < m; j++){
     AttributeNode nd2 = list2[j];
     if (list2start == j) list2start++;
     if (nd2 == null) continue;
     if (matchedNodes[nd2.UniqueKey] != null) continue;
     Differences diff = this.GetDifferences(nd1, nd2);
     if (diff == null){Debug.Assert(false); continue;}
     if (diff.Similarity <= 0.5){
       //Not a good enough match
       if (list2start == j+1) list2start--; //The next call to GetClosestMatch will start looking at list2start, so this node will be considered then
       continue; //ignore it for the rest of this call
     }
     if (winnerSoFar != null && winnerSoFar.Similarity >= diff.Similarity) continue;
     winnerSoFar = closestDifferences = diff;
     closest = nd2;
     list2pos = j;
     if (diff.NumberOfDifferences == 0) return closest; //Perfect match, no need to look for other matches
   }
   if (closest != null){
     //^ assert winnerSoFar != null;
     //closest is closer to nd1 than any other node in list2, but this is no good if some other node in list1 has a better claim on closest
     for (int i = list1pos+1, n = list1.Count; i < n; i++){
       AttributeNode nd1alt = list1[i];
       if (nd1alt == null) continue;
       if (matchedNodes[nd1alt.UniqueKey] != null) continue;
       Differences diff = this.GetDifferences(nd1alt, closest);
       if (diff == null){Debug.Assert(false); continue;}
       if (diff.Similarity <= winnerSoFar.Similarity) continue;
       //nd1alt has a better claim on closest. See if it wants closest.
       Differences diff2;
       int j, k = list2start;
       AttributeNode nd2alt = this.GetClosestMatch(nd1alt, list1, list2, i, ref k,  matchedNodes, out diff2, out j);
       if (nd2alt != closest){
         Debug.Assert(nd2alt != null && diff2 != null && diff2.Similarity >= diff.Similarity);
         continue; //nd1alt prefers nd2alt to closest, so closest is still available
       }
       //nd1alt wants closest, take it out of the running
       matchedNodes[closest.UniqueKey] = nd1alt;
       //Now that closest is out of the running, try again
       k = list2start;
       AttributeNode newClosest = this.GetClosestMatch(nd1, list1, list2, i, ref k, matchedNodes, out winnerSoFar, out list2pos);
       //put closest back in the running so that the next call to this routine will pick it up
       matchedNodes[closest.UniqueKey] = closest;
       closest = newClosest;
       break;
     }
   }
   closestDifferences = winnerSoFar;
   return closest;
 }
開發者ID:tapicer,項目名稱:resource-contracts-.net,代碼行數:59,代碼來源:Comparer.cs

示例7: SVGPathElement

 /***********************************************************************************/
 public SVGPathElement(AttributeList attrList, SVGTransformList inheritTransformList, SVGPaintable inheritPaintable, SVGGraphics r)
     : base(inheritTransformList)
 {
     _attrList = attrList;
     _paintable = new SVGPaintable(inheritPaintable, attrList);
     _render = r;
     Initial();
 }
開發者ID:pjezek,項目名稱:UnitySVG,代碼行數:9,代碼來源:SVGPathElement.cs

示例8: CustomPropertyDescriptor

 internal CustomPropertyDescriptor(object owner, PropertyDescriptor pd)
     : base(pd)
 {
     propertyDescriptor = pd;
     this.owner = owner;
     attributes = new AttributeList(pd.Attributes);
     UpdateMemberData();
 }
開發者ID:ssuing8825,項目名稱:ServiceBusExplorer,代碼行數:8,代碼來源:CustomPropertyDescriptor.cs

示例9: Translate

 private AttributeList Translate(CodeAttributeDeclarationCollection attributes, AttributeList attributeList){
   if (attributes == null) return null;
   int n = attributes.Count;
   if (attributeList == null)
     if (n == 0) return null; else attributeList = new AttributeList(n);
   for (int i = 0; i < n; i++)
     attributeList.Add(this.Translate(attributes[i]));
   return attributeList;
 }
開發者ID:tapicer,項目名稱:resource-contracts-.net,代碼行數:9,代碼來源:CodeDom.cs

示例10: VisitAttributeList

 public override AttributeList VisitAttributeList(AttributeList attributes)
 {
     AttributeList list = new AttributeList();
     for (int i = 0; i < attributes.Count; i++)
     {
         AttributeNode a = attributes[i];
         list.Add(VisitAttributeNode(a));
     }
     return list;
 }
開發者ID:ZingModelChecker,項目名稱:Zing,代碼行數:10,代碼來源:ZReplacer.cs

示例11: SVGPolylineElement

 //================================================================================
 public SVGPolylineElement(  AttributeList attrList,
             SVGTransformList inheritTransformList,
             SVGPaintable inheritPaintable,
             SVGGraphics _render)
     : base(inheritTransformList)
 {
     this._attrList = attrList;
     this._render = _render;
     this._paintable = new SVGPaintable(inheritPaintable, attrList);
     this._listPoints = ExtractPoints(this._attrList.GetValue("points"));
 }
開發者ID:nanuinteractive,項目名稱:UnitySVG,代碼行數:12,代碼來源:SVGPolylineElement.cs

示例12: SVGStopElement

 /***************************************************************************/
 public SVGStopElement(AttributeList attrList)
 {
     _stopColor = new SVGColor(attrList.GetValue("stop-color"));
     string temp = attrList.GetValue("offset").Trim();
     if(temp != "") {
       if(temp.EndsWith("%")) {
     _offset = float.Parse(temp.TrimEnd(new char[1] { '%' }), System.Globalization.CultureInfo.InvariantCulture);
       } else {
     _offset = float.Parse(temp, System.Globalization.CultureInfo.InvariantCulture)* 100;
       }
     }
 }
開發者ID:nanuinteractive,項目名稱:UnitySVG,代碼行數:13,代碼來源:SVGStopElement.cs

示例13: SVGStopElement

 /***************************************************************************/
 public SVGStopElement(AttributeList attrList)
 {
     _stopColor = new SVGColor(attrList.GetValue("stop-color"));
     string temp = attrList.GetValue("offset").Trim();
     if(temp != "") {
       if(temp.EndsWith("%")) {
     _offset = SVGNumber.ParseToFloat(temp.TrimEnd(new char[1]{'%'}));
       } else {
     _offset = SVGNumber.ParseToFloat(temp)* 100;
       }
     }
 }
開發者ID:pjezek,項目名稱:UnitySVG,代碼行數:13,代碼來源:SVGStopElement.cs

示例14: SVGCircleElement

 //================================================================================
 public SVGCircleElement(AttributeList attrList,
           SVGTransformList inheritTransformList,
           SVGPaintable inheritPaintable,
           SVGGraphics _render)
     : base(inheritTransformList)
 {
     this._attrList = attrList;
     this._render = _render;
     this._paintable = new SVGPaintable(inheritPaintable, this._attrList);
     this._cx = new SVGLength(attrList.GetValue("cx"));
     this._cy = new SVGLength(attrList.GetValue("cy"));
     this._r = new SVGLength(attrList.GetValue("r"));
 }
開發者ID:nanuinteractive,項目名稱:UnitySVG,代碼行數:14,代碼來源:SVGCircleElement.cs

示例15: GetTag

		public Tag GetTag()
		{
			AttributeList attributes = new AttributeList();

			foreach(Attribute x in List)
			{
				attributes.Add((Attribute)x.Clone());
			}

            Tag retVal = new Tag(m_tag, attributes);

			return(retVal);
		}
開發者ID:hamoji,項目名稱:sprajax,代碼行數:13,代碼來源:ParseHTML.cs


注:本文中的AttributeList類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。