与 Outlook 的重复模式和日历接口的最佳 C# 实现
我是否应该引用 Outlook 互操作重复模式 来自我的核心对象代码的对象,还是应该在我的核心中复制它的“接口”(我宽松地使用该术语),然后与另一层中的 Outlook 进行通信?
我是一家小公司的小开发人员,拥有小型软件产品。多年来,客户一直要求我们的 C#/SQLServer RDBMS 中具有 Outlook 互操作性。我们终于为他们实现了这一目标,但 Outlook 加载项超出了范围。
感谢 stackoverflow 和 google(当然还有 MS 文档),我已经让我们的程序成功保存约会、取消会议、发送邀请......现在我们需要决定如何处理重复情况。
当我开始感觉自己被吸引时,我正在查看 Outlook 的“约会重复”窗口(并将其与 Google 日历的“重复”窗口进行比较)......正如我上面暗示的那样,我们通常会避免“刮牦牛剃毛”,但我们'如果这就是保持对我们产品的控制所需要的,我们将重新发明轮子。
据我所知,其他人已经解决了这个问题,但我们的管理层可能永远不会让我们走这条路。
Should I reference the Outlook Interop Recurrence Pattern object from my core object code or should I duplicate its "interface" (and I use that term loosely) within my core and then communicate with Outlook in another layer?
I'm a small developer in a small company with a small software product. For years, customers have clamored for Outlook interoperability in our C#/SQLServer RDBMS. We're finally making it happen for them, but an Outlook Add-in is out of scope.
Thanks to stackoverflow and google (and of course the MS documentation), I've got our program successfully saving appointments, cancelling meetings, sending invites... Now we need to decide how to handle recurrences.
I was looking at Outlook's "Appointment Recurrence" window (and comparing it with Google Calendar's "Repeat" window) when I started to feel myself getting sucked in... As I hinted above, we usually avoid "Yak Shaving," but we'll re-invent the wheel if that's what it takes to keep control of our products.
I understand that other people have already solved this problem, but our management will probably never let us go that route.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
看起来为了实现 Outlook 的功能,您需要
DayOfMonth
、DayOfWeekMask
、Duration
、EndTime
、<代码>实例,<代码>间隔,<代码>月份,<代码>模式开始日期,<代码>重复类型,StartTime
,以及指定结束时间的某种方式。尽管 Outlook 使用
Occurrences
、NoEndDate
和PatternEndDate
的某种组合来指定结束时间,但您可以使用可以为 null 的PatternEndDate
> 或可为空的Occurrences
以满足功能。我相信实际的 Outlook 对象具有内置的特定验证规则,可能需要按特定顺序设置属性。我将实现自己的对象,该对象仅在正确的时间执行验证,然后按正确的顺序设置 Outlook 对象的属性。
It looks like in order to implement Outlook's functionality, you would need
DayOfMonth
,DayOfWeekMask
,Duration
,EndTime
,Instance
,Interval
,MonthOfYear
,PatternStartDate
,RecurrenceType
,StartTime
, and some way to specify when it ends.Although Outlook uses some combination of
Occurrences
,NoEndDate
, andPatternEndDate
to specify the end, you could use a nullablePatternEndDate
or a nullableOccurrences
to satisfy the functionality.I believe the actual Outlook object has specific validation rules built in that may require properties to be set in a specific order. I would implement my own object that only performs validation at the right time and then sets the Outlook object's properties in the proper order.