예제 #1
0
        public ConvertOperation(IDataObject data, Operation allowedOp)
        {
            allowedOp &= data.GetAllowedConvertOp();

            this.data      = new ConversionData(data);
            this.allowedOp = allowedOp;
        }
예제 #2
0
 public void MarkObjectHandled(object data)
 {
     if (data == null)
     {
         return;
     }
     if (data is IContentRef)
     {
         data = (data as IContentRef).Res;
     }
     this.handledObj.Add(data);
 }
예제 #3
0
 public bool IsObjectHandled(object data)
 {
     if (data == null)
     {
         return(false);
     }
     if (data is IContentRef)
     {
         data = (data as IContentRef).Res;
     }
     return(this.handledObj.Contains(data));
 }
예제 #4
0
        public ConvertOperation(IEnumerable <object> data, Operation allowedOp)
        {
            DataObject dataObj = new DataObject();

            foreach (object obj in data)
            {
                if (obj == null)
                {
                    continue;
                }
                dataObj.SetData(obj.GetType(), obj);
            }
            this.data      = new ConversionData(dataObj);
            this.allowedOp = allowedOp;
        }